Bug #5269
closedAll ThreadError in PStore transaction will be caught and replaced with PStore::Error
Description
=begin
I noticed all ThreadError in PStore transaction will be caught and replaced with PStore::Error.
Here is an example:
require 'pstore'
ps = PStore.new("hoge")
ps.transaction do
 raise ThreadError
end
The ThreadError was replaced with PStore::Error.
/usr/local/lib/ruby/1.9.1/pstore.rb:342:in rescue in transaction': nested transaction (PStore::Error) from /usr/local/lib/ruby/1.9.1/pstore.rb:312:in
transaction'
from pstore_rescue.rb:4:in `'
I wrote and attached a patch. Patched PStore passes in test/test_pstore.rb.
=end
Files
Updated by Glass_saga (Masaki Matsushita) about 13 years ago
- File patch.diff patch.diff added
I amended the patch.
Rescue modifier can't be specified exception class to catch.
Updated by ko1 (Koichi Sasada) almost 13 years ago
- Assignee set to nahi (Hiroshi Nakamura)
Updated by shyouhei (Shyouhei Urabe) almost 13 years ago
- Status changed from Open to Assigned
Updated by Anonymous about 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r37617.
Masaki, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
- lib/pstore.rb (PStore): fix not to replace ThreadError raised in
#transaction block with PStore::Error.
[ruby-core:39238] [Bug #5269]