com.microfocus.cobol
Class CobolException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.microfocus.cobol.CobolException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CobolEntryException, COBOLException, CobolProgramNotFoundException, CobolRecordException, CobolRuntimeException

public class CobolException
extends Exception
implements Serializable

This exception is thrown by various methods when COBOL has caused an exception

Copyright: Copyright (c) 2002-2003
Company: Micro Focus International Ltd

Since:
Net Express 4.0, Server Express 4.0
Version:
3.16, 3/6/03
See Also:
Serialized Form

Constructor Summary
CobolException()
          Construct a CobolException with no message or cause.
CobolException(String s)
          Construct a CobolException with a given message and no cause
CobolException(String s, Throwable cause)
          Constructs a CobolException with a given message and the cause of the exception
CobolException(Throwable cause)
          Constructs a CobolException that wraps the cause of the real exception
 
Method Summary
 Throwable getCause()
          Returns the cause of this throwable or null if the cause is nonexistent or unknown.
 String getMessage()
          get the exception message (also shows messages associated with the cause of the exception)
 Throwable initCause(Throwable cause)
          Initializes the cause of this throwable to the specified value.
 void printStackTrace()
          Prints this CobolException and its backtrace to the standard error stream and if a cause was specified this is also written to the standard error stream.
 void printStackTrace(PrintStream s)
          Prints this CobolException and its backtrace to the given print stream and if a cause was specified this is also written to the print stream.
 void printStackTrace(PrintWriter s)
          Prints this CobolException and its backtrace to the given print writer and if a cause was specified this is also written to the print writer stream.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CobolException

public CobolException()
Construct a CobolException with no message or cause.


CobolException

public CobolException(String s)
Construct a CobolException with a given message and no cause

Parameters:
s - message

CobolException

public CobolException(String s,
                      Throwable cause)
Constructs a CobolException with a given message and the cause of the exception

Parameters:
s - message
cause - reason for the exception
See Also:
initCause(java.lang.Throwable)

CobolException

public CobolException(Throwable cause)
Constructs a CobolException that wraps the cause of the real exception

Parameters:
cause - reason for the exception
See Also:
initCause(java.lang.Throwable)
Method Detail

initCause

public Throwable initCause(Throwable cause)
Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

Parameters:
cause - of exception
Returns:
this
See Also:
Throwable, Exception, Error

getCause

public Throwable getCause()
Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

Returns:
cause of the exception or null
See Also:
Throwable, Exception, Error

printStackTrace

public void printStackTrace()
Prints this CobolException and its backtrace to the standard error stream and if a cause was specified this is also written to the standard error stream.


printStackTrace

public void printStackTrace(PrintStream s)
Prints this CobolException and its backtrace to the given print stream and if a cause was specified this is also written to the print stream.

Parameters:
s - - PrintStream to use for output

printStackTrace

public void printStackTrace(PrintWriter s)
Prints this CobolException and its backtrace to the given print writer and if a cause was specified this is also written to the print writer stream.

Parameters:
s - - PrintWriter to use for output

getMessage

public String getMessage()
get the exception message (also shows messages associated with the cause of the exception)

Returns:
a exception



Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.