Hi everyone.

I was looking into the asphyre source. And i must admit, that it's an impressive piece of work. The code looks very clean and it all fits together in a very elegant way.

One thing i noticed was that there wasn't much error handling code present.
Only error checking like this:

[pascal]
if not Succeeded( ARiskyAPICall) then
exit;
[/pascal]

Okay... This is the way i do it:

[pascal]
Result := ARiskyAPICall;
if not Succeeded(Result) then
begin
ReportError( Result, 'A Risky API Call failed' , CurrentModule);
Exit;
end;
[/pascal]

Report error assembles the information and adds it to the log-file.

My approach results in bloated routines. It takes 6 lines instead of 2 and therefore it is much work to handle every error in the entire engine and give them all nice descriptive error-strings. The Asphyre way looks much better and cleaner.

So i started thinking.... Do i need all this error-handling code :? ?

When i throw away my error-handling, I will get much cleaner code and i dont have to think about the errorstrings. So generally: maintaining your code will be easier but debugging it might be harder.

I like to know your experiences with this issue.

What is your approach?
When do you handle/log your errors and when not?
Do you find it easy to debug code with Asphyre-Style error checking?

Thanx a bunch!