/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to classes/jpgraph.php

  • Committer: Suren A. Chilingaryan
  • Date: 2010-01-21 03:02:44 UTC
  • Revision ID: csa@dside.dyndns.org-20100121030244-m4qgh1horjgaa08l
Support for jpgraph3

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
include($JPGRAPH_PATH . "/jpgraph_canvas.php");
6
6
include($JPGRAPH_PATH . "/jpgraph_canvtools.php");
7
7
 
8
 
 
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;
13
 
 
14
 
        throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
15
 
    }
 
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;
 
13
 
 
14
            throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
 
15
        }
 
16
    }
 
17
 
 
18
    JpGraphError::Install("JpGraphErrObjectADEIException");
 
19
} else {
 
20
     JpGraphError::SetImageFlag(false);
 
21
/*
 
22
    This is actually is not needed any more, and exceptions should be caught
 
23
    by try blocks, I suppose.
 
24
    
 
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;
 
29
 
 
30
            throw new ADEIException(translate("JpGraph Exception: %s", $aMsg), $num);
 
31
        }
 
32
    }
 
33
 
 
34
    that would cause problems
 
35
    set_exception_handler(array('JpGraphADEIException', 'defaultHandler'));
 
36
*/
16
37
}
17
38
 
18
 
 
19
 
JpGraphError::Install("JpGraphErrObjectADEIException");
20
 
 
21
39
?>
 
 
b'\\ No newline at end of file'