Skip to content

Commit

Permalink
[TASK] Throw exception instead of dying
Browse files Browse the repository at this point in the history
  • Loading branch information
kaystrobach authored Nov 3, 2022
1 parent 6613b97 commit 71ad139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tcpdi/tcpdi_parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1439,8 +1439,8 @@ private function _getPageRotation($obj) { // $obj = /Page
* @since 1.0.000 (2011-05-23)
*/
public function Error($msg) {
// exit program and print error
die("<strong>TCPDI_PARSER ERROR [{$this->uniqueid}]: </strong>".$msg);
//throw exception instead of die();
throw new \Exception('TCPDI_PARSER ERROR [' . $this->uniqueid . ']: ' . $msg, 1);
}

} // END OF TCPDF_PARSER CLASS
Expand Down

0 comments on commit 71ad139

Please sign in to comment.