ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations
@ 2013-09-27 11:11 headius (Charles Nutter)
  2013-09-30  2:51 ` [ruby-core:57470] [ruby-trunk - Feature #8960] " ko1 (Koichi Sasada)
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: headius (Charles Nutter) @ 2013-09-27 11:11 UTC (permalink / raw
  To: ruby-core


Issue #8960 has been reported by headius (Charles Nutter).

----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?


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

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

* [ruby-core:57470] [ruby-trunk - Feature #8960] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
@ 2013-09-30  2:51 ` ko1 (Koichi Sasada)
  2013-09-30 13:16 ` [ruby-core:57489] " headius (Charles Nutter)
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ko1 (Koichi Sasada) @ 2013-09-30  2:51 UTC (permalink / raw
  To: ruby-core


Issue #8960 has been updated by ko1 (Koichi Sasada).

Category set to core
Assignee set to ko1 (Koichi Sasada)
Target version set to current: 2.1.0

I'll try before preview-2.

JRuby already has a implementation and tests?

----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-42085

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: current: 2.1.0


All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?


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

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

* [ruby-core:57489] [ruby-trunk - Feature #8960] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
  2013-09-30  2:51 ` [ruby-core:57470] [ruby-trunk - Feature #8960] " ko1 (Koichi Sasada)
@ 2013-09-30 13:16 ` headius (Charles Nutter)
  2013-12-13  3:19 ` [ruby-core:59082] " nobu (Nobuyoshi Nakada)
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: headius (Charles Nutter) @ 2013-09-30 13:16 UTC (permalink / raw
  To: ruby-core


Issue #8960 has been updated by headius (Charles Nutter).


JRuby has implementation but no tests. The test should look pretty much like Thread#backtrace_locations tests, though.

I can work on some tests if you work on impl for MRI.
----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-42102

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: current: 2.1.0


All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?


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

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

* [ruby-core:59082] [ruby-trunk - Feature #8960] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
  2013-09-30  2:51 ` [ruby-core:57470] [ruby-trunk - Feature #8960] " ko1 (Koichi Sasada)
  2013-09-30 13:16 ` [ruby-core:57489] " headius (Charles Nutter)
@ 2013-12-13  3:19 ` nobu (Nobuyoshi Nakada)
  2013-12-13  4:32 ` [ruby-core:59084] [ruby-trunk - Feature #8960][Feedback] " ko1 (Koichi Sasada)
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: nobu (Nobuyoshi Nakada) @ 2013-12-13  3:19 UTC (permalink / raw
  To: ruby-core


Issue #8960 has been updated by nobu (Nobuyoshi Nakada).


What will be returned from an exception set by Exception#set_backtrace in JRuby?
----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-43633

Author: headius (Charles Nutter)
Status: Open
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: current: 2.1.0


All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?


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

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

* [ruby-core:59084] [ruby-trunk - Feature #8960][Feedback] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
                   ` (2 preceding siblings ...)
  2013-12-13  3:19 ` [ruby-core:59082] " nobu (Nobuyoshi Nakada)
@ 2013-12-13  4:32 ` ko1 (Koichi Sasada)
  2013-12-29 16:11 ` [ruby-core:59381] [ruby-trunk - Feature #8960] " headius (Charles Nutter)
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ko1 (Koichi Sasada) @ 2013-12-13  4:32 UTC (permalink / raw
  To: ruby-core


Issue #8960 has been updated by ko1 (Koichi Sasada).

Status changed from Closed to Feedback
Target version changed from current: 2.1.0 to next minor
% Done changed from 100 to 0

Now, I implemented half-baked feature (read-only backtrace locations).

How about to continue how to change it?

----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-43636

Author: headius (Charles Nutter)
Status: Feedback
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?


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

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

* [ruby-core:59381] [ruby-trunk - Feature #8960] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
                   ` (3 preceding siblings ...)
  2013-12-13  4:32 ` [ruby-core:59084] [ruby-trunk - Feature #8960][Feedback] " ko1 (Koichi Sasada)
@ 2013-12-29 16:11 ` headius (Charles Nutter)
  2016-08-17 21:08 ` [ruby-core:76954] [Ruby trunk Feature#8960] " ryan.nevell
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: headius (Charles Nutter) @ 2013-12-29 16:11 UTC (permalink / raw
  To: ruby-core


Issue #8960 has been updated by headius (Charles Nutter).


ko1: I have no problem whatsoever with backtrace_locations being read-only now and forever. I'm glad to see this made it into 2.1 as at least a basic feature.
----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-43946

Author: headius (Charles Nutter)
Status: Feedback
Priority: Normal
Assignee: ko1 (Koichi Sasada)
Category: core
Target version: next minor


All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?


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

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

* [ruby-core:76954] [Ruby trunk Feature#8960] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
                   ` (4 preceding siblings ...)
  2013-12-29 16:11 ` [ruby-core:59381] [ruby-trunk - Feature #8960] " headius (Charles Nutter)
@ 2016-08-17 21:08 ` ryan.nevell
  2016-08-18  1:44 ` [ruby-core:76957] " nobu
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ryan.nevell @ 2016-08-17 21:08 UTC (permalink / raw
  To: ruby-core

Issue #8960 has been updated by Ryan Nevell.

Assignee changed from Koichi Sasada to Charles Nutter

Is there any way to re-raise an exception and propagate backtrace_locations? When I want to trap an exception and provide a different exception class and error message, I'm used to doing something like:
~~~ ruby
rescue => e
  raise MyCustomException, "Error details", e.backtrace
~~~

But this is calling set_backtrace, leaving the resulting exception's backtrace_locations nil (on MRI 2.3.1) or [] (on jruby 9.1.2.0).

If only some exceptions will have a valid backtrace_locations array (matching the information in backtrace), it is difficult to write code that takes advantage of this feature.

----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-60183

* Author: Charles Nutter
* Status: Feedback
* Priority: Normal
* Assignee: Charles Nutter
----------------------------------------
All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?



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

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

* [ruby-core:76957] [Ruby trunk Feature#8960] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
                   ` (5 preceding siblings ...)
  2016-08-17 21:08 ` [ruby-core:76954] [Ruby trunk Feature#8960] " ryan.nevell
@ 2016-08-18  1:44 ` nobu
  2016-11-25  9:21 ` [ruby-core:78343] [Ruby trunk Feature#8960][Assigned] " shyouhei
  2016-11-25 14:15 ` [ruby-core:78361] [Ruby trunk Feature#8960] " shyouhei
  8 siblings, 0 replies; 10+ messages in thread
From: nobu @ 2016-08-18  1:44 UTC (permalink / raw
  To: ruby-core

Issue #8960 has been updated by Nobuyoshi Nakada.


Ryan Nevell wrote:
> Is there any way to re-raise an exception and propagate `backtrace_locations`? When I want to trap an exception and provide a different exception class and error message, I'm used to doing something like:

Nothing right now.

> If only some exceptions will have a valid `backtrace_locations` array (matching the information in `backtrace`), it is difficult to write code that takes advantage of this feature.

Agree.

----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-60186

* Author: Charles Nutter
* Status: Feedback
* Priority: Normal
* Assignee: Charles Nutter
----------------------------------------
All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?



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

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

* [ruby-core:78343] [Ruby trunk Feature#8960][Assigned] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
                   ` (6 preceding siblings ...)
  2016-08-18  1:44 ` [ruby-core:76957] " nobu
@ 2016-11-25  9:21 ` shyouhei
  2016-11-25 14:15 ` [ruby-core:78361] [Ruby trunk Feature#8960] " shyouhei
  8 siblings, 0 replies; 10+ messages in thread
From: shyouhei @ 2016-11-25  9:21 UTC (permalink / raw
  To: ruby-core

Issue #8960 has been updated by Shyouhei Urabe.

Status changed from Feedback to Assigned
Assignee changed from Charles Nutter to Koichi Sasada

----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-61708

* Author: Charles Nutter
* Status: Assigned
* Priority: Normal
* Assignee: Koichi Sasada
----------------------------------------
All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?



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

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

* [ruby-core:78361] [Ruby trunk Feature#8960] Add Exception#backtrace_locations
  2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
                   ` (7 preceding siblings ...)
  2016-11-25  9:21 ` [ruby-core:78343] [Ruby trunk Feature#8960][Assigned] " shyouhei
@ 2016-11-25 14:15 ` shyouhei
  8 siblings, 0 replies; 10+ messages in thread
From: shyouhei @ 2016-11-25 14:15 UTC (permalink / raw
  To: ruby-core

Issue #8960 has been updated by Shyouhei Urabe.


We looked at this issue today.  It turned out that ruby do not fully implement what was needed originally now.  Reopened the ticket to assign ko1.

----------------------------------------
Feature #8960: Add Exception#backtrace_locations
https://bugs.ruby-lang.org/issues/8960#change-61730

* Author: Charles Nutter
* Status: Assigned
* Priority: Normal
* Assignee: Koichi Sasada
----------------------------------------
All parties agreed this would be useful to add in https://bugs.ruby-lang.org/issues/7895 and ko1 suggested I file a feature against ruby-trunk. So here it is.

I might be able to come up with a patch, but I'm not sure when. Help wanted.

Can we agree this will go into 2.1?



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

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

end of thread, other threads:[~2016-11-25 13:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-27 11:11 [ruby-core:57430] [ruby-trunk - Feature #8960][Open] Add Exception#backtrace_locations headius (Charles Nutter)
2013-09-30  2:51 ` [ruby-core:57470] [ruby-trunk - Feature #8960] " ko1 (Koichi Sasada)
2013-09-30 13:16 ` [ruby-core:57489] " headius (Charles Nutter)
2013-12-13  3:19 ` [ruby-core:59082] " nobu (Nobuyoshi Nakada)
2013-12-13  4:32 ` [ruby-core:59084] [ruby-trunk - Feature #8960][Feedback] " ko1 (Koichi Sasada)
2013-12-29 16:11 ` [ruby-core:59381] [ruby-trunk - Feature #8960] " headius (Charles Nutter)
2016-08-17 21:08 ` [ruby-core:76954] [Ruby trunk Feature#8960] " ryan.nevell
2016-08-18  1:44 ` [ruby-core:76957] " nobu
2016-11-25  9:21 ` [ruby-core:78343] [Ruby trunk Feature#8960][Assigned] " shyouhei
2016-11-25 14:15 ` [ruby-core:78361] [Ruby trunk Feature#8960] " shyouhei

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).