public class SBMLExtensionException extends Object
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
Certain situations can result in an exception being thrown by libSBML
package extensions. A prominent example involves the constructor for
SBMLNamespaces
(and its subclasses), which will throw
SBMLExtensionException
if the arguments it is given refer to an unknown
SBML Level 3 package. The situation can arise for legitimate SBML
files if the necessary package extension has not been registered with
a given copy of libSBML.
SBMLNamespaces
Constructor and Description |
---|
SBMLExtensionException(String errmsg)
Creates a new
SBMLExtensionException object with a given message. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Explicitly deletes the underlying native object.
|
public SBMLExtensionException(String errmsg)
SBMLExtensionException
object with a given message.
errmsg
- a string, the text of the error message to store
with this exceptionpublic 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 SBMLExtensionException.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 SBMLExtensionException.delete()
themselves.