るりまサーチ

最速Rubyリファレンスマニュアル検索!
548件ヒット [1-100件を表示] (0.046秒)
トップページ > クエリ:nil[x] > クエリ:exception[x]

別のキーワード

  1. _builtin nil?
  2. nilclass nil?
  3. object nil?
  4. object nil
  5. _builtin nil

検索結果

<< 1 2 3 ... > >>

Exception.exception(error_message = nil) -> Exception (27341.0)

例外オブジェクトを生成して返します。

...属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。

//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}

//emlist[例][ruby]{
e = Exception.exception("some mes...
...sage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}...

Exception.new(error_message = nil) -> Exception (12241.0)

例外オブジェクトを生成して返します。

...属性 Exception#message の値になり、デフォルトの例外ハンドラで表示されます。

//emlist[例][ruby]{
e = Exception.new("some message")
p e # => #<Exception: some message>
p e.message # => "some message"
//}

//emlist[例][ruby]{
e = Exception.exception("some mes...
...sage")
p e # => #<Exception: some message>
p e.message # => "some message"
//}...

Exception#cause -> Exception | nil (9218.0)

self の前の例外(self が rescue 節や ensure 節の中で発生した例外の場合、 その前に発生していた元々の例外)を返します。存在しない場合は nil を返し ます。

...ue 節や ensure 節の中で発生した例外の場合、
その前に発生していた元々の例外)を返します。存在しない場合は nil を返し
ます。

//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
rescue
p $! # => #<RuntimeError:...

Exception#set_backtrace(errinfo) -> nil | String | [String] (9107.0)

バックトレース情報に errinfo を設定し、設定されたバックトレース 情報を返します。

...バックトレース情報に errinfo を設定し、設定されたバックトレース
情報を返します。

@param errinfo nil、String あるいは String の配列のいずれかを指定します。

//emlist[例][ruby]{
begin
begin
raise "inner"
rescue
raise "outer"
end
r...

Exception#message -> String (9012.0)

エラーメッセージをあらわす文字列を返します。

...エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}...

絞り込み条件を変える

Exception#to_s -> String (9012.0)

エラーメッセージをあらわす文字列を返します。

...エラーメッセージをあらわす文字列を返します。

//emlist[例][ruby]{
begin
1 + nil
rescue => e
p e.message #=> "nil can't be coerced into Fixnum"
end
//}...

Exception2MessageMapper#Fail(exception_class = nil, *rest) -> () (3228.0)

登録されている情報を使用して、例外を発生させます。

...param exception_class 例外クラス。

@param rest メッセージに埋め込む値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。

例:

class Foo
extend Exception2Mess...
...ageMapper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>

def foo
Raise NewExceptionClass, 1, 2, 3
end
end

Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。

Fo...
...o.Raise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)
# という例外が発生します。...

Exception2MessageMapper#Raise(exception_class = nil, *rest) -> () (3228.0)

登録されている情報を使用して、例外を発生させます。

...param exception_class 例外クラス。

@param rest メッセージに埋め込む値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない場合に発生します。

例:

class Foo
extend Exception2Mess...
...ageMapper
p def_exception :NewExceptionClass, "message...%d, %d and %d" # =>

def foo
Raise NewExceptionClass, 1, 2, 3
end
end

Foo.new().foo() #=> in `Raise': message...1, 2 and 3 (Foo::NewExceptionClass)
# という例外が発生します。

Fo...
...o.Raise Foo::NewExceptionClass, 1, 3, 5 #=> in `Raise': message...1, 3 and 5 (Foo::NewExceptionClass)
# という例外が発生します。...

Exception2MessageMapper.Fail(klass = E2MM, exception_class = nil, *rest) -> () (3216.0)

登録されている情報を使用して、例外を発生させます。

...@param klass 一階層上となるクラス名を指定します。

@param exception_class 例外クラス。

@param rest メッセージに埋め込む値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない...

Exception2MessageMapper.Raise(klass = E2MM, exception_class = nil, *rest) -> () (3216.0)

登録されている情報を使用して、例外を発生させます。

...@param klass 一階層上となるクラス名を指定します。

@param exception_class 例外クラス。

@param rest メッセージに埋め込む値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない...

絞り込み条件を変える

Exception2MessageMapper#fail(exception_class = nil, *rest) -> () (3214.0)

登録されている情報を使用して、例外を発生させます。

...されている情報を使用して、例外を発生させます。

@param exception_class 例外クラス。

@param rest メッセージに埋め込む値。

@raise Exception2MessageMapper::ErrNotRegisteredException 指定された例外クラスに対応するメッセージが存在しない...

Exception2MessageMapper.e2mm_message(klass, exp) -> String | nil (3102.0)

@todo

@todo

@param klass

@param exp
<< 1 2 3 ... > >>