- See also
button.on("click", function() {
esriRequest(url, options).then(function(response) {
// do something useful
}).catch(function(error){
console.log("informative error message: ", error.message);
});
});
Constructors
Property Overview
Name | Type | Summary | Class |
---|---|---|---|
Object | The details object provides additional details specific to the error, giving more information about why the error was raised. more details | Error | |
String | A message describing the details of the error. more details | Error | |
String | A unique error name. more details | Error |
Property Details
-
details Object
-
The details object provides additional details specific to the error, giving more information about why the error was raised. For example, the details object for esriRequest includes additional information to help the developer diagnose issues with a problematic request.
ExamplesomeAsyncFunction.then(callback) .catch(function(error){ console.log("Error details: ", error.details); });
-
message String
-
A message describing the details of the error.
ExamplesomeAsyncFunction.then(callback) .catch(function(error){ console.log("Error message: ", error.message); });
-
name String
-
A unique error name. This can be used to map to a localized error message to present to the user.
ExamplesomeAsyncFunction.then(callback) .catch(function(error){ console.log("Error name: ", error.name); });