summaryrefslogtreecommitdiff
path: root/lib/e2mmap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/e2mmap.rb')
-rw-r--r--lib/e2mmap.rb54
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/e2mmap.rb b/lib/e2mmap.rb
index 4e6d2f99b39..18a7ca003d5 100644
--- a/lib/e2mmap.rb
+++ b/lib/e2mmap.rb
@@ -1,8 +1,8 @@
#
# e2mmap.rb - for ruby 1.1
-# $Release Version: 2.0$
-# $Revision: 1.10 $
-# by Keiju ISHITSUKA
+# $Release Version: 2.0$
+# $Revision: 1.10 $
+# by Keiju ISHITSUKA
#
# --
# Usage:
@@ -60,19 +60,19 @@ module Exception2MessageMapper
def bind(cl)
self.module_eval %[
def Raise(err = nil, *rest)
- Exception2MessageMapper.Raise(self.class, err, *rest)
+ Exception2MessageMapper.Raise(self.class, err, *rest)
end
alias Fail Raise
def self.included(mod)
- mod.extend Exception2MessageMapper
+ mod.extend Exception2MessageMapper
end
]
end
# Fail(err, *rest)
- # err: exception
- # rest: message arguments
+ # err: exception
+ # rest: message arguments
#
def Raise(err = nil, *rest)
E2MM.Raise(self, err, *rest)
@@ -81,19 +81,19 @@ module Exception2MessageMapper
alias fail Raise
# def_e2message(c, m)
- # c: exception
- # m: message_form
- # define exception c with message m.
+ # c: exception
+ # m: message_form
+ # define exception c with message m.
#
def def_e2message(c, m)
E2MM.def_e2message(self, c, m)
end
# def_exception(n, m, s)
- # n: exception_name
- # m: message_form
- # s: superclass(default: StandardError)
- # define exception named ``c'' with message m.
+ # n: exception_name
+ # m: message_form
+ # s: superclass(default: StandardError)
+ # define exception named ``c'' with message m.
#
def def_exception(n, m, s = StandardError)
E2MM.def_exception(self, n, m, s)
@@ -106,10 +106,10 @@ module Exception2MessageMapper
@MessageMap = {}
# E2MM.def_e2message(k, e, m)
- # k: class to define exception under.
- # e: exception
- # m: message_form
- # define exception c with message m.
+ # k: class to define exception under.
+ # e: exception
+ # m: message_form
+ # define exception c with message m.
#
def E2MM.def_e2message(k, c, m)
E2MM.instance_eval{@MessageMap[[k, c]] = m}
@@ -117,11 +117,11 @@ module Exception2MessageMapper
end
# E2MM.def_exception(k, n, m, s)
- # k: class to define exception under.
- # n: exception_name
- # m: message_form
- # s: superclass(default: StandardError)
- # define exception named ``c'' with message m.
+ # k: class to define exception under.
+ # n: exception_name
+ # m: message_form
+ # s: superclass(default: StandardError)
+ # define exception named ``c'' with message m.
#
def E2MM.def_exception(k, n, m, s = StandardError)
n = n.id2name if n.kind_of?(Fixnum)
@@ -131,9 +131,9 @@ module Exception2MessageMapper
end
# Fail(klass, err, *rest)
- # klass: class to define exception under.
- # err: exception
- # rest: message arguments
+ # klass: class to define exception under.
+ # err: exception
+ # rest: message arguments
#
def E2MM.Raise(klass = E2MM, err = nil, *rest)
if form = e2mm_message(klass, err)
@@ -141,7 +141,7 @@ module Exception2MessageMapper
#p $@
#p __FILE__
b.shift if b[0] =~ /^#{Regexp.quote(__FILE__)}:/
- raise err, sprintf(form, *rest), b
+ raise err, sprintf(form, *rest), b
else
E2MM.Fail E2MM, ErrNotRegisteredException, err.inspect
end