libmergepdf icon indicating copy to clipboard operation
libmergepdf copied to clipboard

throw exceptions instead of die()

Open frpuser opened this issue 1 year ago • 1 comments

In the public function Error($msg) in the file tcpdi_parser.php is calling the die() function. Please replace this die function with an exception throw, so it would be possible to catch the exception in error case.

public function Error($msg) {
        //throw exception instead of die();
        throw new Exception("TCPDI_PARSER ERROR [{$this->uniqueid}]: ".$msg,1);
        // exit program and print error
        //die("<strong>TCPDI_PARSER ERROR [{$this->uniqueid}]: </strong>".$msg);
    }

frpuser avatar Nov 03 '22 10:11 frpuser