From 71ad139e81f4f854b6b1001436648e3702f041c1 Mon Sep 17 00:00:00 2001 From: Kay Strobach Date: Thu, 3 Nov 2022 11:19:51 +0100 Subject: [PATCH] [TASK] Throw exception instead of dying #74 --- tcpdi/tcpdi_parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcpdi/tcpdi_parser.php b/tcpdi/tcpdi_parser.php index 2391934..f034ec5 100644 --- a/tcpdi/tcpdi_parser.php +++ b/tcpdi/tcpdi_parser.php @@ -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("TCPDI_PARSER ERROR [{$this->uniqueid}]: ".$msg); + //throw exception instead of die(); + throw new \Exception('TCPDI_PARSER ERROR [' . $this->uniqueid . ']: ' . $msg, 1); } } // END OF TCPDF_PARSER CLASS