public class SBMLConstructorException extends IllegalArgumentException
In some situations, constructors for SBML objects may need to indicate to
callers that the creation of the object failed. The failure may be for
different reasons, such as an attempt to use invalid parameters or a
system condition such as a memory error. To communicate this to callers,
those classes will throw an SBMLConstructorException
.
In languages that don't have an exception mechanism (e.g., C), the constructors generally try to return an error code instead of throwing an exception.
Constructor and Description |
---|
SBMLConstructorException(String v)
Exception thrown by libSBML object constructors if something prevents
the object from being properly created.
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Explicitly deletes the underlying native object.
|
String |
getSBMLErrMsg()
Returns the message associated with this SBML exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public SBMLConstructorException(String v)
public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the SBMLConstructorException.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke SBMLConstructorException.delete()
themselves.
public String getSBMLErrMsg()