libmergepdf
libmergepdf copied to clipboard
throw exceptions instead of die()
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);
}