summaryrefslogtreecommitdiff
path: root/src/main/java/io/devnulllabs/openjava/mop/MOPException.java
blob: f751498e95312ccc77e408ee04e2e46aa0c7855b (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
48
49
50
51
52
53
54
55
56
57
58
/*
 * MOPException.java
 *
 * @author   Michiaki Tatsubori
 * @version  %VERSION% %DATE%
 * @see      java.lang.Object
 *
 * COPYRIGHT 1999 by Michiaki Tatsubori, ALL RIGHTS RESERVED.
 */
package io.devnulllabs.openjava.mop;


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


/**
 * MOPException is thrown if the requested introspection or intercession
 * cannot be performed on the class, field, method or constructor object.
 *
 * @author   Michiaki Tatsubori
 * @version  1.0
 * @since    $Id: MOPException.java,v 1.2 2003/02/19 02:55:01 tatsubori Exp $
 * @see java.lang.Object
 */
public class MOPException extends Exception
{
    private Exception ex = null;

    public MOPException() {
    }

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

    public MOPException( String message ) {
    super( message );
    }

    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 );
    }
    }

}