summaryrefslogtreecommitdiff
path: root/src/main/java/io/devnulllabs/openjava/ptree/ParseTreeException.java
blob: be546da361ec82e0b1546b2fe2c314a52e932a6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/** This subclass of symbol represents (at least) terminal symbols returned
 *  by the scanner and placed on the parse stack.  At present, this
 *  class does nothing more than its super class.
 *
 * @see java_cup.runtime.symbol
 * @version last updated: 06/11/97
 * @author  Michiaki Tatsubori
 */
package io.devnulllabs.openjava.ptree;


import java.io.PrintStream;
import java.io.PrintWriter;


public class ParseTreeException extends Exception
{
    private Exception ex = null;

    public ParseTreeException() {
    }

    public ParseTreeException( Exception e ) {
        super( e.getMessage() );
    this.ex = e;
    }

    public ParseTreeException( String str ) {
        super( str );
    }

    public void printStackTrace( PrintWriter o ) {
        if (ex != null) {
        ex.printStackTrace( o );
    } else {
        super.printStackTrace( o );
    }
    }

    public void printStackTrace( PrintStream o ) {
        if (ex != null) {
        ex.printStackTrace( o );
    } else {
        super.printStackTrace( o );
    }
    }
}