View Issue Details

IDProjectCategoryView StatusLast Update
0000206LDMudRuntimepublic2009-10-02 08:06
ReporterlarsAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Summary0000206: Error handling inside a hook
DescriptionShort: Error handling within a catch.
From: Michael Sporn
Date: 990629
Type: Feature
State: Unclassified

Immediate error handling should be independent from a catch(), as too
many people forget to handle errors returned by a catch.

Maybe a modification to runtime/heartbeat/log_error, giving an extra
parameter 'is_caught', and if is_caught is true, the return value decides
if the driver prints a traceback or not before doing the actual catch.

In general, the error and diagnostic handling is much too confused.

--- See the discussion on amylaar-users in November '2000. The error routine
could be set by a hook, and if not set, the driver could fall back to the
old routines.
TagsNo tags attached.
External Data (URL)

Relationships

related to 0000352 new pragmas to enforce/restrict catch modifiers 

Activities

zesstra

2009-09-26 17:56

administrator   ~0001307

I agree, that catch() was often (and is still sometimes) bad, because the error does not get visible except for the people reading the debug log (not many). The ;publish modifier changes that to a degree. But maybe a possibility to implicitly use ;publish by default, enabled by some compiletime, commandline option or pragma...?

Sorcerer

2009-09-27 12:53

updater   ~0001314

If you do not want to introduce an new pragma - I consider 'pedantic' to be quite suitable for such a behaviour.

Gnomi

2009-09-29 11:06

manager   ~0001338

What about the other catch modifiers. Should a mudlib or program be able to change their default, too? (We have a default statement, might use that?)

zesstra

2009-09-30 14:11

administrator   ~0001360

Default statement? Uh, never read about that. :-(
If we enable to change the default behaviour, we may also introduce log and nopublish in addition to nolog and publish to override default behaviour, I guess.
BTW: related is the wish to disallow to use certain modifiers, e.g. disallow nolog. I think, there was/is somewhere an issue dealing with that.

Issue History

Date Modified Username Field Change
2004-11-26 21:52 lars New Issue
2009-09-26 17:56 zesstra Note Added: 0001307
2009-09-27 12:53 Sorcerer Note Added: 0001314
2009-09-29 11:06 Gnomi Note Added: 0001338
2009-09-30 14:11 zesstra Note Added: 0001360
2009-10-02 08:06 zesstra Relationship added related to 0000352