|
#1
|
|||
|
|||
|
Hi, i'm looking at my applications error handling and have a question.
Right now, when a server request goes wrong for reasons specific to the logic of my application, i currently solve the communication this way: 1. i set status to STATUS_FAILURE 2. i call setData with a positive integer that has a meaning to my app so that it can react properly in the browser. I was thinking that it perhaps was better that i set the DSResponse status to custom negative integer values instead, since it's more in line with how you do it... And that way, i can have global handling of my custom status codes in my custom RPCExceptionHandler. However, it's hard to know from the documentation which integer range you use for your status codes How do i figure out which integers are "safe" for me to use, or do you recommend a different approach? |
|
#2
|
|||
|
|||
|
Your own error codes is a good approach.. we recommend using -5001 through -10000.
|
|
#3
|
|||
|
|||
|
Hey, i'm a little bit late in answering, but thanks!
Small question: Since i didn't manage to find any docs regarding this, when you say "we recommend", is that on a javadoc page or similar somewhere that i missed? Still trying to get my bearings regarding how to best find smartgwt documentation/information. :) |
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DMI with custom operation | isosmart | Smart GWT Technical Q&A | 10 | 14th May 2012 01:39 |
| performCustomOperation and Custom Datasource | jpappalardo | Smart GWT Technical Q&A | 5 | 20th Apr 2012 13:22 |
| Callback function is not called after DSResponse status set to Failure | issac.ming | Smart GWT Technical Q&A | 2 | 26th Oct 2011 04:27 |
| Custom attributes in DSResponse. Is it possible? | asg2007 | Smart GWT Technical Q&A | 6 | 4th Apr 2011 04:05 |
| Custom REST DataSource - DSRequest data | fabio.bozzo | Smart GWT Technical Q&A | 0 | 3rd Jan 2010 23:51 |