[#60404] is RB_GC_GUARD needed in rb_io_syswrite? — Eric Wong <normalperson@...>
I haven't gotten it to crash as-is, but it seems like we need to
4 messages
2014/02/01
[#60682] volatile usages — Eric Wong <normalperson@...>
Hi all, I went ahead and removed some use of volatile which were once
5 messages
2014/02/13
[#60794] [RFC] rearrange+pack vtm and time_object structs — Eric Wong <normalperson@...>
Extracted from addendum on top of Feature #9362 (cache-aligned objects).
4 messages
2014/02/16
[#61139] [ruby-trunk - Feature #9577] [Open] [PATCH] benchmark/driver.rb: align columns in text output — normalperson@...
Issue #9577 has been reported by Eric Wong.
3 messages
2014/02/28
[ruby-core:60420] [CommonRuby - Feature #8257] Exception#cause to carry originating exception along with new one
From:
eregontp@...
Date:
2014-02-02 15:10:52 UTC
List:
ruby-core #60420
Issue #8257 has been updated by Benoit Daloze.
`raise ErrorClass, msg, cause: cause` was implemented with the rest in r44473.
e = (
begin
raise ArgumentError, "arg error"
rescue
nie = NotImplementedError.new("nie")
raise StandardError, "stderr", cause: nie
end) rescue $!
e.cause # => #<NotImplementedError: nie>
But the cause is not shown in the error output, which I think is now the most important step forward.
----------------------------------------
Feature #8257: Exception#cause to carry originating exception along with new one
https://bugs.ruby-lang.org/issues/8257#change-44891
* Author: Charles Nutter
* Status: Open
* Priority: Normal
* Assignee: Yukihiro Matsumoto
* Category:
* Target version: Ruby 2.1.0
----------------------------------------
Often when a lower-level API raises an exception, we would like to re-raise a different exception specific to our API or library. Currently in Ruby, only our new exception is ever seen by users; the original exception is lost forever, unless the user decides to dig around our library and log it. We need a way to have an exception carry a "cause" along with it.
Java has getCause/setCause and standard constructors that take a cause exception. Printing out an exception's backtrace then reports both that exception and any "cause" exception.
Rubinius has added a similar feature: https://gist.github.com/dbussink/b2e01e51d0c50b27004f
The changes required for this feature are pretty benign:
* Exception#cause and #cause= accessors.
* A new set of Kernel#raise overloads that accept (as a trailing argument, probably) the "cause" exception.
* Modifications to backtrace-printing logic to also display backtrace information from the "cause" exception (and in turn, from any nested "cause" exceptions).
There's some discussion here about alternatives to #cause, none of which are quite as elegant as having it built in: http://www.skorks.com/2013/04/ruby-why-u-no-have-nested-exceptions/
--
http://bugs.ruby-lang.org/