[progress Communities] [progress Openedge Abl] Forum Post: Re: Jsdo Aftersavechanges...

  • Thread starter Thread starter bcpreece
  • Start date Start date
Status
Not open for further replies.
B

bcpreece

Guest
Hi Edsel The resolution you describe looks fine for someone doing their own programming at the front end, but it's hard to see how to apply it to the code auto-generated by Telerik Platform Views. So far the best I have been able to do is to wrangle the error out of the responseText property of xhr by clumsy string handling: error: function (e) { app.mobileApp.pane.loader.hide(); if (e.xhr) { var errorText = ""; try { errorText = JSON.stringify(e.xhr); } catch (jsonErr) { errorText = e.xhr.responseText || e.xhr.statusText || 'An error has occurred!'; } var errorIndex = e.xhr.responseText.indexOf('"prods:error"'); var errorMessagePlus = e.xhr.responseText.slice(errorIndex + 15); errorIndex = errorMessagePlus.indexOf('"'); var errorText = errorMessagePlus.slice(0, errorIndex); alert("Error:" + errorText); } else if (e.errorThrown) { alert("Error thrown" + e.errorThrown); } }, I can also parse the responseText string back into an object and the error message is tantalisingly there, but my javascript knowledge isn't sufficient to extract the error: prods:errors looks like a sub object of dsSolutionAsset, but I can't seem to extract it Any suggestions? Regards Brian

Continue reading...
 
Status
Not open for further replies.
Back
Top