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

wrong stack trace information about the raised exception #11309

Araq opened this issue May 23, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 23, 2019

The following snippet produces a misleading stacktrace, it mentions 'Exception' and not 'CustomChildError':

  CustomError* = object of Exception
  CustomChildError* = object of CustomError

  FutureBase* = ref object of RootObj
    error*: ref Exception

  Future*[T] = ref object of FutureBase
    v: T

proc fail[T](future: Future[T], error: ref Exception) =
  future.error = error

proc w1(): Future[int] =
  result = Future[int](), "CustomChildError message"))

proc main =
  var fut = w1()
  if true:
    raise fut.error


Araq added a commit that referenced this issue May 23, 2019

Araq added a commit that referenced this issue May 23, 2019

@Araq Araq closed this in aa4cf92 May 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.