diff options
author | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-10 08:44:29 +0000 |
---|---|---|
committer | (no author) <(no author)@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-10 08:44:29 +0000 |
commit | 6e3a72afccaa2bcd1b44a447c179bd81c27ac567 (patch) | |
tree | f99563ed31c2f6a8facc7160cccde602d39af79b /lib/e2mmap1_0.rb | |
parent | 62e648e148b3cb9f96dcce808c55c02b7ccb4486 (diff) |
This commit was manufactured by cvs2svn to create tag
'v1_3_1_990210'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_3_1_990210@399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/e2mmap1_0.rb')
-rw-r--r-- | lib/e2mmap1_0.rb | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/lib/e2mmap1_0.rb b/lib/e2mmap1_0.rb deleted file mode 100644 index d245dec975..0000000000 --- a/lib/e2mmap1_0.rb +++ /dev/null @@ -1,71 +0,0 @@ -# -# e2mmap.rb - -# $Release Version: 1.0$ -# $Revision$ -# $Date$ -# by Keiju ISHITSUKA -# -# -- -# -# - -module Exception2MessageMapper - RCS_ID='-$Header$-' - E2MM = Exception2MessageMapper - - def E2MM.extend_to(b) - c = eval("self", b) - c.extend(self) - c.bind(b) - end - - def bind(b) - eval " - @binding = binding - E2MM_ErrorMSG = Hash.new - - # fail(err, *rest) - # err: 例外 - # rest: メッセージに渡すパラメータ - # - def fail!(*rest) - super - end - - def fail(err, *rest) - $! = err.new(sprintf(E2MM_ErrorMSG[err], *rest)) - super() - end - - public :fail - # def_exception(c, m) - # c: exception - # m: message_form - # 例外cのメッセージをmとする. - # - def def_e2message(c, m) - E2MM_ErrorMSG[c] = m - end - - # def_exception(c, m) - # c: exception_name - # m: message_form - # s: 例外スーパークラス(デフォルト: Exception) - # 例外名``c''をもつ例外を定義し, そのメッセージをmとする. - # - def def_exception(c, m) - - c = c.id2name if c.kind_of?(Fixnum) - eval \"class \#{c} < Exception - end - E2MM_ErrorMSG[\#{c}] = '\#{m}' - \", @binding - end -", b - - end - - E2MM.extend_to(binding) - def_exception("ErrNotClassOrModule", "Not Class or Module") -end - |