[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: SEH: the throw keyword

Status
Not open for further replies.
A

agent_008_nl

Guest
dbeavon You stated "The author clearly misunderstands SEH. The main purpose of an exception is to carry an error-related output from a method back to its callers (client programs). This output is used when *all* the other behavior of the method has been rendered irrelevant . In other words the exception is already an *implied* output parameter (and more besides - see PS***). So the author seems to be asking us to re-invent the wheel by putting errors in the returned results of all our methods, even though errors can already be sent back for "free". Besides, the return value of a function is typically already in use for some other purpose that is much more *relevant* from a semantic standpoint." In another message you talk about .net. The author that "clearly misunderstands SEH" discusses the same problems as is done in .net docs. In docs.microsoft.com/.../da0007-avoid-using-exceptions-for-control-flow two problems with throwing exceptions are named: - You obscure program flow (and thereby make it less readable enterprisecraftsmanship.com/.../) - It is expensive performancewise That makes your statement 'errors can already be sent back for "free"' quite suspicious. Matt Baker I'm interested in your opinion, you already wrote something?

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