Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Catch error on SmartClient

    Hi,

    I tried to implement my own error handling like the code below, but it never enter that catch block. Is there any ways to achieve that?

    Code:
    try {
        isc.RPCManager.sendRequest({
          httpMethod: "GET",
          actionURL: "./GetData",
          willHandleError: true,
          callback: function (response, data, request) {
            if (response.status < 0) {
              throw "Record not found";
            } else {
              // success script
            }
          },
        });
      } catch (e) {
        // handle thrown error here
        isc.warn(e);
      }

    #2
    Just found out that it is not possible to catch exceptions throw in callback. Please ignore my post.

    Comment


      #3
      If you're concerned about how errors from DSRequests are or should be handled, you may want to read the Error Handling help topic.

      Comment

      Working...
      X