Skip to content

Instantly share code, notes, and snippets.

@szyku
Last active June 10, 2019 09:38
Show Gist options
  • Save szyku/d33cbc29bdf153ddbfc5cbf125cbe3c3 to your computer and use it in GitHub Desktop.
Save szyku/d33cbc29bdf153ddbfc5cbf125cbe3c3 to your computer and use it in GitHub Desktop.
Calculator Exception Usage
<?php
try {
$loanSchedule = $calculator->calculate($loanDeptorRequest);
} catch (CalculatorException $e) {
// log the event or sth else
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment