Exception.php 575 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace PhpOffice\PhpSpreadsheet\Calculation;
  3. use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
  4. class Exception extends PhpSpreadsheetException
  5. {
  6. /**
  7. * Error handler callback.
  8. *
  9. * @param mixed $code
  10. * @param mixed $string
  11. * @param mixed $file
  12. * @param mixed $line
  13. * @param mixed $context
  14. */
  15. public static function errorHandlerCallback($code, $string, $file, $line, $context)
  16. {
  17. $e = new self($string, $code);
  18. $e->line = $line;
  19. $e->file = $file;
  20. throw $e;
  21. }
  22. }