AMPLException

public class AMPLException extends RuntimeException

Represent an exception generated by AMPL

Constructors

public AMPLException(Exception ex)

Construct an AMPLException from an inner exception

Parameters:
  • ex – Inner exception

Methods

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.
public String getMessage()

Returns a message for this error.

Returns:The error or warning message.
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.
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.
public String toString()