.. java:import:: com.ampl Source AMPLException ============= .. java:package:: com.ampl :noindex: .. java:type:: public class AMPLException extends RuntimeException Represent an exception generated by AMPL Fields ------ isWarning ^^^^^^^^^ .. java:field:: boolean isWarning :outertype: AMPLException line ^^^^ .. java:field:: int line :outertype: AMPLException Constructors ------------ AMPLException ^^^^^^^^^^^^^ .. java:constructor:: AMPLException(String message, boolean isWarning) :outertype: AMPLException Constructor :param message: Message AMPLException ^^^^^^^^^^^^^ .. java:constructor:: AMPLException(String message, int line, int offset, String name, Source s, boolean isWarning) :outertype: AMPLException Construct an exception from an AMPL error :param error: AMPLException ^^^^^^^^^^^^^ .. java:constructor:: public AMPLException(Exception ex) :outertype: AMPLException Construct an AMPLException from an inner exception :param ex: Inner exception Methods ------- getLineNumber ^^^^^^^^^^^^^ .. 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. getMessage ^^^^^^^^^^ .. java:method:: @Override public String getMessage() :outertype: AMPLException Returns a message for this error. :return: The error or warning message. getOffset ^^^^^^^^^ .. 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. getSourceName ^^^^^^^^^^^^^ .. 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. toString ^^^^^^^^ .. java:method:: @Override public String toString() :outertype: AMPLException