Last change
on this file since 461 was 439, checked in by coas-nagasima, 4 years ago |
mrubyを2.1.1に更新
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-ruby
|
File size:
898 bytes
|
Rev | Line | |
---|
[331] | 1 | # ISO 15.2.24
|
---|
| 2 | class ArgumentError < StandardError
|
---|
| 3 | end
|
---|
| 4 |
|
---|
[439] | 5 | # ISO 15.2.25 says "LocalJumpError < StandardError"
|
---|
| 6 | class LocalJumpError < ScriptError
|
---|
[331] | 7 | end
|
---|
| 8 |
|
---|
| 9 | # ISO 15.2.26
|
---|
| 10 | class RangeError < StandardError
|
---|
| 11 | end
|
---|
| 12 |
|
---|
| 13 | class FloatDomainError < RangeError
|
---|
| 14 | end
|
---|
| 15 |
|
---|
| 16 | # ISO 15.2.26
|
---|
| 17 | class RegexpError < StandardError
|
---|
| 18 | end
|
---|
| 19 |
|
---|
| 20 | # ISO 15.2.29
|
---|
| 21 | class TypeError < StandardError
|
---|
| 22 | end
|
---|
| 23 |
|
---|
| 24 | # ISO 15.2.31
|
---|
| 25 | class NameError < StandardError
|
---|
| 26 | attr_accessor :name
|
---|
| 27 |
|
---|
| 28 | def initialize(message=nil, name=nil)
|
---|
| 29 | @name = name
|
---|
| 30 | super(message)
|
---|
| 31 | end
|
---|
| 32 | end
|
---|
| 33 |
|
---|
| 34 | # ISO 15.2.32
|
---|
| 35 | class NoMethodError < NameError
|
---|
| 36 | attr_reader :args
|
---|
| 37 |
|
---|
| 38 | def initialize(message=nil, name=nil, args=nil)
|
---|
| 39 | @args = args
|
---|
| 40 | super message, name
|
---|
| 41 | end
|
---|
| 42 | end
|
---|
| 43 |
|
---|
| 44 | # ISO 15.2.33
|
---|
| 45 | class IndexError < StandardError
|
---|
| 46 | end
|
---|
| 47 |
|
---|
| 48 | class KeyError < IndexError
|
---|
| 49 | end
|
---|
| 50 |
|
---|
| 51 | class NotImplementedError < ScriptError
|
---|
| 52 | end
|
---|
| 53 |
|
---|
[439] | 54 | class FrozenError < RuntimeError
|
---|
| 55 | end
|
---|
| 56 |
|
---|
[331] | 57 | class StopIteration < IndexError
|
---|
| 58 | attr_accessor :result
|
---|
| 59 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.