typed exception X::Hash::Store::OddNumber #59

Merged
merged 2 commits into from Feb 28, 2012

Projects

None yet

3 participants

@Siddhant

No description provided.

@moritz moritz merged commit 83b15cd into rakudo:nom Feb 28, 2012
@oetiker oetiker commented on the diff Mar 1, 2012
src/core/Exceptions.pm
@@ -325,3 +325,7 @@ my class X::Routine::Unwrap is Exception {
my class X::Constructor::Positional is Exception {
method message() { "Default constructor only takes named arguments" }
}
+
@oetiker
oetiker Mar 1, 2012

Moritz, just read your blog post. Cool.

Question: what is the idea behind having all exception classes declared in a central file and not locally?

cheers
tobi

@Siddhant
Siddhant Jun 30, 2012

Oetiker,

The advantage of having exception classes declared centrally is that it's easier to find them all and perhaps thus helps in easy localizations (translations).

@oetiker
oetiker Jul 2, 2012

the ease of grabbing strings for localization from source seems seems to be an odd reason for moving away from the well proven approach of keeping things together that work together ... eg documentation and code (see POD) ... so keeping all the exceptions in a separate tree seems odd, especially when I think of adding new exceptions for my own classes, or would that work differently ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment