marf.util
Class MARFException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by marf.util.MARFException
All Implemented Interfaces:
java.io.Serializable, IMARFException
Direct Known Subclasses:
ClassificationException, FeatureExtractionException, GUIException, InvalidSampleFormatException, MathException, NLPException, PreprocessingException, StorageException

public class MARFException
extends java.lang.Exception
implements IMARFException

Class MARFException.

This class extends Exception for MARF specifics.

$Id: MARFException.java,v 1.21 2007/12/23 06:29:47 mokhov Exp $

Since:
0.0.1
Version:
$Revision: 1.21 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
protected  java.lang.String strMessage
          Our own error message container.
 
Constructor Summary
MARFException()
          Default MARF exception.
MARFException(java.lang.Exception poException)
          Wraps Exception object around.
MARFException(java.lang.String pstrMessage)
          Generic exception.
MARFException(java.lang.String pstrMessage, java.lang.Exception poException)
          This is used for debug purposes only with some unusual Exception's.
 
Method Summary
 IMARFException create()
           
 IMARFException create(java.lang.Exception poException)
           
 IMARFException create(java.lang.String pstrMessage)
           
 IMARFException create(java.lang.String pstrMessage, java.lang.Exception poException)
           
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 java.lang.String getMessage()
          Returns string representation of the error message.
 java.lang.String toString()
          Override toString() to display our message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

strMessage

protected java.lang.String strMessage
Our own error message container. Needed as we don't have access to the parent's. Initially an empty string.

Constructor Detail

MARFException

public MARFException()
Default MARF exception. Better be overridden for normal internal message.

Since:
0.3.0.3

MARFException

public MARFException(java.lang.String pstrMessage)
Generic exception.

Parameters:
pstrMessage - Error message string

MARFException

public MARFException(java.lang.String pstrMessage,
                     java.lang.Exception poException)
This is used for debug purposes only with some unusual Exception's. It allows the originating Exceptions stack trace to be returned.

Parameters:
pstrMessage - Error message string
poException - Exception object to dump

MARFException

public MARFException(java.lang.Exception poException)
Wraps Exception object around.

Parameters:
poException - Exception to wrap around
Since:
0.3.0.2
Method Detail

getMessage

public java.lang.String getMessage()
Returns string representation of the error message. Definalize in 0.3.0.6 to allow derivatives.

Overrides:
getMessage in class java.lang.Throwable
Returns:
error string

create

public IMARFException create()
Specified by:
create in interface IMARFException

create

public IMARFException create(java.lang.Exception poException)
Specified by:
create in interface IMARFException

create

public IMARFException create(java.lang.String pstrMessage)
Specified by:
create in interface IMARFException

create

public IMARFException create(java.lang.String pstrMessage,
                             java.lang.Exception poException)
Specified by:
create in interface IMARFException
See Also:
IMARFException.create(java.lang.String, java.lang.Exception)

toString

public java.lang.String toString()
Override toString() to display our message.

Overrides:
toString in class java.lang.Throwable
Returns:
string representation of this exception
Since:
0.3.0.3

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string
Since:
0.3.0.2


SourceForge Logo