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

Filter stack trace in error output #189

Open
bwbecker opened this issue Jan 18, 2019 · 0 comments
Open

Filter stack trace in error output #189

bwbecker opened this issue Jan 18, 2019 · 0 comments

Comments

@bwbecker
Copy link

bwbecker commented Jan 18, 2019

Here are some example stack traces in utest output:

X example.HelloSpec.test3 0ms 
  java.lang.IndexOutOfBoundsException: 10
    scala.collection.LinearSeqOptimized.apply(LinearSeqOptimized.scala:63)
    scala.collection.LinearSeqOptimized.apply$(LinearSeqOptimized.scala:61)
    scala.collection.immutable.List.apply(List.scala:85)
    example.HelloSpec$.$anonfun$tests$4(HelloSpec.scala:29)
X example.HelloSpec.test4 3ms 
  java.lang.AssertionError: assertion failed: ==> assertion failed: 1 != 2
    scala.Predef$.assert(Predef.scala:219)
    utest.asserts.Asserts$ArrowAssert.$eq$eq$greater(Asserts.scala:193)
    example.HelloSpec$.$anonfun$tests$5(HelloSpec.scala:33)

I think most of the time the part of the trace from utest itself (utest.asserts.Assert) and the scala library (scala.*) aren't useful.

Would the project maintainers welcome a pull request that added a feature where the user could provide a function to filter the stack trace? It would probably be modelled on exceptionStackFrameHighlighter with exceptionIncludeStackTraceElement(s:StackTraceElement):Boolean = true as the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant