com.sssw.rt.util
Class AgoDataException
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--com.sssw.rt.util.AgoException
|
+--com.sssw.rt.util.AgoApiException
|
+--com.sssw.rt.util.AgoDataException
- All Implemented Interfaces:
- AgiParentedException, Serializable
- Direct Known Subclasses:
- AgoDataConcurrencyException, AgoInvalidDataException, AgoMissingDataException
- public class AgoDataException
- extends AgoApiException
The base class of declared exceptions thrown by methods
in the public API for bad data. Typically, this exception
is thrown when the data is rejected by the server.
Example:
// This code attached to a save button on a form checks to see if data in
// the dataset has changed, and if so, updates the data source.
try {
// If any data changed
if (agData.haveRowsChanged()) {
agData.updateRows();
}
}
catch (AgoDataException e) {
// A user either failed to enter a value in the form or a value they
// entered was not valid. Tell the user.
agGeneral.showMessage ("Error",
"Data in the form is either missing or invalid. Please try again.");
}
- See Also:
- Serialized Form
Methods inherited from class com.sssw.rt.util.AgoException |
copyTo,
getExceptionHTML,
getExceptionMessage,
getExceptionMessage,
getHTML,
getMessage,
getMessage,
getParentException,
printStackTrace,
printStackTrace,
printStackTrace,
setHTML |
AgoDataException
public AgoDataException()
getSource
public Object getSource()
- Get the source of the exception. This will typically be a
subform, subpage, or control.
- Usage:
This method would be used with forms that contain
subforms or subviews with tables associated with them and an
updateRows() is performed in the top level form. This method will return the subform
or subview from which the data exception originated.
- Example:
Object src = e.getSource();