るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 > >>

Exception#cause -> Exception | nil (18207.0)

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

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

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

NEWS for Ruby 3.0.0 (300.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...mlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]
* `=>` is added. It can be used like a rightward assignment.
17260
* `in...
...> 0

{b: 0, c: 1} => {b:}
p b #=> 0
//}

//emlist{
# version 3.0
0 in 1 #=> false

# version 2.7
0 in 1 #=> raise NoMatchingPatternError
//}

* Find-pattern is added. [EXPERIMENTAL]
16828

//emlist{
case ["a", 1, "b", "c", 2, "d", "e", "f", 3]
in [*pre, String => x, String => y, *post]
p pr...
...Fiber#backtrace_locations provide per-fiber backtrace. 16815
* The limitation of Fiber#transfer is relaxed. 17221
* GC
* GC.auto_compact= and GC.auto_compact have been added to control when compaction runs. Setting `auto_compact=` to `true` will cause compaction to occur during major col...

Kernel.#fail(error_type, message = nil, backtrace = caller(0), cause: $!) -> () (222.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...は例外 RuntimeError を発生させます。

//emlist[例][ruby]{
begin
open("nonexist")
rescue
raise #=> `open': No such file or directory - "nonexist" (Errno::ENOENT)
end
//}

引数を渡した場合は、例外メッセージ message を持った error_type の示す例外(省略時 Ru...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
@raise TypeError exception メソッドが例外オブジェクトを返さな...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
Exception オブジェクトまたは nil を指定できます。
@raise Ty...

Kernel.#fail(message, cause: $!) -> () (222.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...は例外 RuntimeError を発生させます。

//emlist[例][ruby]{
begin
open("nonexist")
rescue
raise #=> `open': No such file or directory - "nonexist" (Errno::ENOENT)
end
//}

引数を渡した場合は、例外メッセージ message を持った error_type の示す例外(省略時 Ru...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
@raise TypeError exception メソッドが例外オブジェクトを返さな...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
Exception オブジェクトまたは nil を指定できます。
@raise Ty...

Kernel.#raise(error_type, message = nil, backtrace = caller(0), cause: $!) -> () (222.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...は例外 RuntimeError を発生させます。

//emlist[例][ruby]{
begin
open("nonexist")
rescue
raise #=> `open': No such file or directory - "nonexist" (Errno::ENOENT)
end
//}

引数を渡した場合は、例外メッセージ message を持った error_type の示す例外(省略時 Ru...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
@raise TypeError exception メソッドが例外オブジェクトを返さな...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
Exception オブジェクトまたは nil を指定できます。
@raise Ty...

絞り込み条件を変える

Kernel.#raise(message, cause: $!) -> () (222.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...は例外 RuntimeError を発生させます。

//emlist[例][ruby]{
begin
open("nonexist")
rescue
raise #=> `open': No such file or directory - "nonexist" (Errno::ENOENT)
end
//}

引数を渡した場合は、例外メッセージ message を持った error_type の示す例外(省略時 Ru...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
@raise TypeError exception メソッドが例外オブジェクトを返さな...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
Exception オブジェクトまたは nil を指定できます。
@raise Ty...

CSV.new(data, options = Hash.new) -> CSV (130.0)

このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。

...speed is important. Also
note that IO objects should be opened in binary mode on Windows if this
feature will be used as the line-ending translation can cause
problems with resetting the document position to where it was before the
read ahead. This String will be transcoded into the dat...
...ror, assuming the data is faulty. You can use this limit to
prevent what are effectively DoS attacks on the parser. However, this
limit can cause a legitimate parse to fail and thus is set to +nil+, or off,
by default.
: :converters
CSV::Converters から取り出した名前の配列...
...が一つだけ
の場合は配列に格納する必要はありません。
全ての組み込みの変換器は、値を変換する前に UTF-8 にエンコーディング変
換を試みます。エンコーディング変換に失敗した場合はフィールドは変換さ
れませ...

Kernel.#fail -> () (122.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...は例外 RuntimeError を発生させます。

//emlist[例][ruby]{
begin
open("nonexist")
rescue
raise #=> `open': No such file or directory - "nonexist" (Errno::ENOENT)
end
//}

引数を渡した場合は、例外メッセージ message を持った error_type の示す例外(省略時 Ru...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
@raise TypeError exception メソッドが例外オブジェクトを返さな...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
Exception オブジェクトまたは nil を指定できます。
@raise Ty...

Kernel.#raise -> () (122.0)

例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。

...は例外 RuntimeError を発生させます。

//emlist[例][ruby]{
begin
open("nonexist")
rescue
raise #=> `open': No such file or directory - "nonexist" (Errno::ENOENT)
end
//}

引数を渡した場合は、例外メッセージ message を持った error_type の示す例外(省略時 Ru...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
@raise TypeError exception メソッドが例外オブジェクトを返さな...
...タックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に設定する例外を指定します。
Exception オブジェクトまたは nil を指定できます。
@raise Ty...

NEWS for Ruby 2.1.0 (78.0)

NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...は参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。

== 2.0.0 以降の変更

=== 言語仕様の変更

* キーワード引数のデフォルト値...
...umerable
* 追加: Enumerable#to_h キーと値のペアのリストをハッシュに変換します。

* Exception
* 追加: Exception#cause 一つ前の例外を新しい例外を返します。
例外を rescue して raise しなおしたときに元の例外が一つ前の例...
...scrub, String#scrub! 不正なバイト列を検証して修正します。
古いバージョンのRubyと一緒に使いたいときは string-scrub gem を使います。

* Symbol
* 全てのシンボルは freeze されるようになりました

* pack/unpack (Array/String)...

絞り込み条件を変える

<< 1 2 > >>