AMPLException#

public class AMPLException extends AMPLExceptionBase#

Represent an exception generated by AMPL

Constructors#

AMPLException#

public AMPLException(AMPLExceptionBase base)#

AMPLException#

public AMPLException(String filename, int row, int offset, String message)#

Methods#

getLineNumber#

public int getLineNumber()#

Returns the line number where the exception occurred. Line numbers starts from 1.

Returns:

An integer representing the line number, or 0 if none is available.

getMessage#

public String getMessage()#

Returns a message for this error.

Returns:

The error or warning message.

getOffset#

public int getOffset()#

Returns the offset, from the beginning of the last executed group of statements where the exception occurred.

Returns:

An integer representing the offset, or 0 if none is available.

getSourceName#

public String getSourceName()#

Returns the name of the source where the exception occurred.

Returns:

A string containing the name, or null if none is available.