.. java:import:: com.ampl Source AMPLException ============= .. java:package:: com.ampl :noindex: .. java:type:: public class AMPLException extends RuntimeException Represent an exception generated by AMPL Constructors ------------ .. java:constructor:: public AMPLException(Exception ex) :outertype: AMPLException Construct an AMPLException from an inner exception :param ex: Inner exception Methods ------- .. java:method:: public int getLineNumber() :outertype: AMPLException Returns the line number where the exception occurred. Line numbers starts from 1. :return: An integer representing the line number, or 0 if none is available. .. java:method:: @Override public String getMessage() :outertype: AMPLException Returns a message for this error. :return: The error or warning message. .. java:method:: public int getOffset() :outertype: AMPLException Returns the offset, from the beginning of the last executed group of statements where the exception occurred. :return: An integer representing the offset, or 0 if none is available. .. java:method:: public String getSourceName() :outertype: AMPLException Returns the name of the source where the exception occurred. :return: A string containing the name, or null if none is available. .. java:method:: @Override public String toString() :outertype: AMPLException