5
5
include($JPGRAPH_PATH . "/jpgraph_canvas.php");
6
6
include($JPGRAPH_PATH . "/jpgraph_canvtools.php");
9
class JpGraphErrObjectADEIException extends JpGraphErrObject {
10
function Raise($aMsg,$aHalt=true) {
11
$num = ADEIException::PLOTTER_EXCEPTION;
12
if (preg_match("/to\s+small\s+plot\s+area/i", $aMsg)) $num = ADEIException::PLOTTER_WINDOW_TOO_SMALL;
14
throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
8
if (method_exists(JpGraphError, "Install")) {
9
class JpGraphErrObjectADEIException extends JpGraphErrObject {
10
function Raise($aMsg,$aHalt=true) {
11
$num = ADEIException::PLOTTER_EXCEPTION;
12
if (preg_match("/to\s+small\s+plot\s+area/i", $aMsg)) $num = ADEIException::PLOTTER_WINDOW_TOO_SMALL;
14
throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
18
JpGraphError::Install("JpGraphErrObjectADEIException");
20
JpGraphError::SetImageFlag(false);
22
This is actually is not needed any more, and exceptions should be caught
23
by try blocks, I suppose.
25
class JpGraphADEIException extends JpGraphException {
26
static public function defaultHandler($aMsg,$aHalt=true) {
27
$num = ADEIException::PLOTTER_EXCEPTION;
28
if (preg_match("/to\s+small\s+plot\s+area/i", $aMsg)) $num = ADEIException::PLOTTER_WINDOW_TOO_SMALL;
30
throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
34
that would cause problems
35
set_exception_handler(array('JpGraphADEIException', 'defaultHandler'));
19
JpGraphError::Install("JpGraphErrObjectADEIException");
b'\\ No newline at end of file'