EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Exceptions vs. OnError

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#24228
Posted: 03/21/2013 13:11:24
by Michael Lovett (Standard support level)
Joined: 03/20/2013
Posts: 28

Hi there

Are there cases in which important errors are only reported via OnError (and no exception is thrown for them)?

In a current app I'm working on, it's actually more convenient for me to do try/catch handling than have an OnError handler, but I want to know if I skip having an OnError handler if I could possibly "miss" some error cases?

The online docs are a little vague on this topic..

Thanks
Michael
#24229
Posted: 03/21/2013 13:15:20
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Could you clarify what exact classes do you use.
#24230
Posted: 03/21/2013 13:18:49
by Eugene Mayevski (EldoS Corp.)

OnError report protocol errors. Vast majority of such errors leads to premature disconnection. You will get an exception in this case. So you can handle OnError for logging purposes (this is recommended) and catch exceptions to properly handle error situations.


Sincerely yours
Eugene Mayevski
#24231
Posted: 03/21/2013 13:24:04
by Michael Lovett (Standard support level)
Joined: 03/20/2013
Posts: 28

I'm referring to SimpleFTP and SimpleSSH clients.

I think this is what I'm hearing you say: any situation that prevents the normal operation of one of these classes (ie, prevents connecting, prevents sending or receiving data, etc) will result in an exception being thrown and I can safely "ignore" OnError in these cases..

Is that right?
#24232
Posted: 03/21/2013 13:26:09
by Eugene Mayevski (EldoS Corp.)

Yes, I can't remember a situation when OnError was fired and connection or data flow continued without exception.


Sincerely yours
Eugene Mayevski
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 501 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!