ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:69953] [Ruby trunk - Bug #11347] [Open] Errors with cause not reported properly to console
       [not found] <redmine.issue-11347.20150713093632@ruby-lang.org>
@ 2015-07-13  9:36 ` akostadinov
  2015-07-13 14:33 ` [ruby-core:69958] [Ruby trunk - Feature #11347] " nobu
  2015-07-15 16:39 ` [ruby-core:69980] " akostadinov
  2 siblings, 0 replies; 3+ messages in thread
From: akostadinov @ 2015-07-13  9:36 UTC (permalink / raw)
  To: ruby-core

Issue #11347 has been reported by Aleksandar Kostadinov.

----------------------------------------
Bug #11347: Errors with cause not reported properly to console
https://bugs.ruby-lang.org/issues/11347

* Author: Aleksandar Kostadinov
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Hello, errors with `cause` are an important and very useful feature for debugging. It seems though default reporting is not showing the `cause` and nested causes to user. Here's a test file:
~~~
raise "GAHGAH" rescue raise "error with cause" rescue e=$!

puts "Error: #{e}"
puts "Cause: #{e.cause}"

raise e
~~~

As you can see, the `cause` of the error is not printed in any way to the console when error is raised:
~~~
$ ruby /tmp/test.rb 
Error: error with cause
Cause: GAHGAH
/tmp/test.rb:1:in `rescue in <main>': error with cause (RuntimeError)
	from /tmp/test.rb:1:in `<main>
~~~



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:69958] [Ruby trunk - Feature #11347] Errors with cause not reported properly to console
       [not found] <redmine.issue-11347.20150713093632@ruby-lang.org>
  2015-07-13  9:36 ` [ruby-core:69953] [Ruby trunk - Bug #11347] [Open] Errors with cause not reported properly to console akostadinov
@ 2015-07-13 14:33 ` nobu
  2015-07-15 16:39 ` [ruby-core:69980] " akostadinov
  2 siblings, 0 replies; 3+ messages in thread
From: nobu @ 2015-07-13 14:33 UTC (permalink / raw)
  To: ruby-core

Issue #11347 has been updated by Nobuyoshi Nakada.

Tracker changed from Bug to Feature
Description updated

----------------------------------------
Feature #11347: Errors with cause not reported properly to console
https://bugs.ruby-lang.org/issues/11347#change-53390

* Author: Aleksandar Kostadinov
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Hello, errors with `cause` are an important and very useful feature for debugging. It seems though default reporting is not showing the `cause` and nested causes to user. Here's a test file:

~~~ruby
raise "GAHGAH" rescue raise "error with cause" rescue e=$!

puts "Error: #{e}"
puts "Cause: #{e.cause}"

raise e
~~~

As you can see, the `cause` of the error is not printed in any way to the console when error is raised:

~~~
$ ruby /tmp/test.rb 
Error: error with cause
Cause: GAHGAH
/tmp/test.rb:1:in `rescue in <main>': error with cause (RuntimeError)
	from /tmp/test.rb:1:in `<main>
~~~



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:69980] [Ruby trunk - Feature #11347] Errors with cause not reported properly to console
       [not found] <redmine.issue-11347.20150713093632@ruby-lang.org>
  2015-07-13  9:36 ` [ruby-core:69953] [Ruby trunk - Bug #11347] [Open] Errors with cause not reported properly to console akostadinov
  2015-07-13 14:33 ` [ruby-core:69958] [Ruby trunk - Feature #11347] " nobu
@ 2015-07-15 16:39 ` akostadinov
  2 siblings, 0 replies; 3+ messages in thread
From: akostadinov @ 2015-07-15 16:39 UTC (permalink / raw)
  To: ruby-core

Issue #11347 has been updated by Aleksandar Kostadinov.


I rather think it is actually a but because it hides very important information from the user. It's like showing your error cut in half or on more pieces. It's just confusing to use `causes` this way. So I call it a bug as the initial feature implementation is somehow broken.

----------------------------------------
Feature #11347: Errors with cause not reported properly to console
https://bugs.ruby-lang.org/issues/11347#change-53417

* Author: Aleksandar Kostadinov
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Hello, errors with `cause` are an important and very useful feature for debugging. It seems though default reporting is not showing the `cause` and nested causes to user. Here's a test file:

~~~ruby
raise "GAHGAH" rescue raise "error with cause" rescue e=$!

puts "Error: #{e}"
puts "Cause: #{e.cause}"

raise e
~~~

As you can see, the `cause` of the error is not printed in any way to the console when error is raised:

~~~
$ ruby /tmp/test.rb 
Error: error with cause
Cause: GAHGAH
/tmp/test.rb:1:in `rescue in <main>': error with cause (RuntimeError)
	from /tmp/test.rb:1:in `<main>
~~~



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-15 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-11347.20150713093632@ruby-lang.org>
2015-07-13  9:36 ` [ruby-core:69953] [Ruby trunk - Bug #11347] [Open] Errors with cause not reported properly to console akostadinov
2015-07-13 14:33 ` [ruby-core:69958] [Ruby trunk - Feature #11347] " nobu
2015-07-15 16:39 ` [ruby-core:69980] " akostadinov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).