EldoS | Feel safer!

Software components for data protection, secure storage and transfer

ElAS2Client raises exception

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#18411
Posted: 12/08/2011 09:44:58
by Hans Zorn (Standard support level)
Joined: 01/24/2011
Posts: 6

When I invoke the Send method, and the server does not return an OK value (e.g. 500) then the Send method raises an exception. I would rather want to check the return code, and (if necessary) raise the exception myself. Is there a way of doing that?
#18412
Posted: 12/08/2011 10:10:57
by Eugene Mayevski (EldoS Corp.)

Catch the exception and check exception object's ErrorCode property.


Sincerely yours
Eugene Mayevski
#18413
Posted: 12/08/2011 10:21:14
by Hans Zorn (Standard support level)
Joined: 01/24/2011
Posts: 6

I have created an event handler for the OnError event to show the errorcode. But this event does not fire; the exception seems to prevent that.
#18414
Posted: 12/08/2011 10:34:12
by Eugene Mayevski (EldoS Corp.)

Please, once again - catch the exception (using try/except) and check the error code.

Code
try
  Send();
except
  on E: ESecureBlackboxError do
    ShowMessage('Error ' + IntToStr(E.ErrorCode));
end;


Sincerely yours
Eugene Mayevski
#18415
Posted: 12/08/2011 11:52:05
by Hans Zorn (Standard support level)
Joined: 01/24/2011
Posts: 6

I did that, and got the errorcode 10058.
Don't know what that means...

Hans
#18416
Posted: 12/08/2011 12:15:57
by Eugene Mayevski (EldoS Corp.)

Winsock error 10058. Connection Reset by Peer (usually remote one). The question is why your server drops connection. Unfortunately it's not possible to say anything more detailed without detailed analysis and reproducing the problem.

If the exception happens, how do you know that it doesn't return OK? Does server's behavior depend on some input parameters (i.e. what you send) or the error is intermittent?


Sincerely yours
Eugene Mayevski
#18417
Posted: 12/08/2011 12:21:38
by Eugene Mayevski (EldoS Corp.)

I've moved your question to the HelpDesk, let's continue there.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 767 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!