Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --suppress-backtrace=num option to limit the backtrace length #3047

Merged
merged 1 commit into from May 14, 2020

Conversation

mame
Copy link
Member

@mame mame commented Apr 21, 2020

$ ./miniruby --suppress-backtrace=5 -e 'def f1 = raise
def f2 = f1
def f3 = f2
def f4 = f3
def f5 = f4
def f6 = f5
def f7 = f6
def f8 = f7
def f9 = f8
f9
'
-e:1:in `f1': unhandled exception
	from -e:2:in `f2'
	from -e:3:in `f3'
	from -e:4:in `f4'
	from -e:5:in `f5'
	from -e:6:in `f6'
	 ... 5 levels...

[Feature #8661]

@mame mame requested a review from nobu April 21, 2020 09:37
@mame
Copy link
Member Author

mame commented Apr 21, 2020

For the detailed behavior, see https://bugs.ruby-lang.org/issues/8661#note-33.

```
$ ./miniruby --backtrace-limit=5 -e 'def f1 = raise
def f2 = f1
def f3 = f2
def f4 = f3
def f5 = f4
def f6 = f5
def f7 = f6
def f8 = f7
def f9 = f8
f9
'
-e:1:in `f1': unhandled exception
	from -e:2:in `f2'
	from -e:3:in `f3'
	from -e:4:in `f4'
	from -e:5:in `f5'
	from -e:6:in `f6'
	 ... 5 levels...
```

[Feature ruby#8661]
@mame mame merged commit 39365b4 into ruby:master May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant