If you throw a MyError::Foo, I would have to explicitly throw that error
And if I prefix my error messages with "MyError::Foo" you'd have to explicitly throw an error that started with that string to break my error handling.
And if two modules chose bad namespaces--like MyError rather than MyModuleName::Error--then the same problem arises in code that uses both modules.
The error vectors are exactly the same! It's still just string compare.
The solution is in well chosen namespaces--whether error prefixes or execption class names.
Just moving to throwing exception objects rather than strings does not fix the underlying problem: that of badly chosen namespaces!
In reply to Re^11: eval to replace die?
by BrowserUk
in thread eval to replace die?
by hsmyers
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |