Select to view content in your preferred language

Lack of Error messages from ESRI javascript

1258
7
06-30-2010 08:19 AM
GermanMontalvo
Emerging Contributor
We have an application that interacts with Google maps and layers that we have stored in our server, limited to the state of Virginia, when we were trying to make some test to see the possible error messages that the user could receive from the application when selected from an area outside virginia to get a report that the application generates, it does not get anything, like our javascript is not communicating with ESRI.

How I can solve it?
0 Kudos
7 Replies
AdamPfister
Esri Contributor
a bit more detail with a code sample that's as complete as possible surrounded by CODE tags would probably be helpful to those trying to understand your request.
0 Kudos
GermanMontalvo
Emerging Contributor
I am attaching further information in order to help me more about it.
0 Kudos
AxelSchaefer
Emerging Contributor
You can try to use try/catch. It's easy to handle.
http://o.dojotoolkit.org/developer/StyleGuide

The geoprocessing tasks in the ESRI JS API also support different events for errors and success.

Axel
0 Kudos
GermanMontalvo
Emerging Contributor
After submitting a job to the geoprocessing service we can see in the messages.xml file associated with that specific job number, and we can see there is an error when processing that job, but the javascript in the client does not realize that there is an error. So the try/catch is not going to help on this unless the ESRI JS API recognize there is an error. So the question is whether we try to open the open messages.xml outside of the ESRI api in order to get the error message?
0 Kudos
derekswingley1
Deactivated User
Are you specifying callback functions for callback, statusCallback and errback? Sample code would be helpful...

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/geoprocessor.htm#submitJob
0 Kudos
GermanMontalvo
Emerging Contributor
Thanks, but I have a question I am using the js for ArcGIS in Google maps and the versions are different as well the commands are slitghtly different, since the submitJob function in the js for Google maps does not include the errback, the error is taken into account as an event in the completeJob event. So could you help me in that specific question?
0 Kudos
derekswingley1
Deactivated User
My mistake.

Are you passing in a function for the third parameter of esri.arcgis.gmaps.QueryTask()? If not, are you listening to the executecomplete event  of the QueryTask?

The second argument passed to your callback (or executecomplete) function should be an error object if an error occurred.

QueryTask documentation:  http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/help/topics/apiref.htm#class_e...
Error object documentation:  http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/gmaps/help/topics/apiref.htm#class_e...
0 Kudos