×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi Loyd,
Loyd Goodbar wrote:
Since the thread also discusses passing the error structure to an API call
and preventing corruption of same, your passing of zero "bytes provided"
prevents the API from providing error feedback.
When you set the bytes provided field to 0, it sends you the same error
message in the form of an *ESCAPE message instead of sending in the data
structure.
Personally, I find this far more useful for two reasons:
1) You can get far more information about the message when it's sent as
an *ESCAPE message. Notably, you can get the MSGF that the message came
from (which isn't available in either of the ERRC0100 or ERRC0200
structures) knowing the msgid without knowing the msgf is, IMHO, kinda
silly.
2) I can easily re-send the message in full glory to the caller. For
example, if you ask for informaton about a user profile that doesn't
exist, or you don't have access to, I don't have to code separate
messages to send back to my caller... I can just re-send the APIs message.
I'm not doing it this way because it's "just an example". I'm doing it
that way by preference.
Frankly, when I was a beginner, I used the API structure a lot.
Experience taught me not to use it, because it's so limited. Now, the
only time I use it is when I'm expecting a lot of failures and the
performance of an *ESCAPE message matters to me.
code and you called it "ErrorNull", but was hoping to see a "correct"
example of using the error structure. Here is an include I use:
My example /was/ correct. RTFM.
As an Amazon Associate we earn from qualifying purchases.