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 panicx package. #176

Merged
merged 2 commits into from
Nov 22, 2020
Merged

Add panicx package. #176

merged 2 commits into from
Nov 22, 2020

Conversation

jmalloc
Copy link
Member

@jmalloc jmalloc commented Nov 22, 2020

What change does this introduce?

This PR adds a new panicx package (within engine) for dealing with panic values that occur within the application or due to a misbehaving application implementation.

The existing controller.ConvertUnexpectedMessagePanic() has been moved to panicx.EnrichUnexpectedMessage().

It improves the nasty code that deals with finding panic locations on the stack and adds a few additional tests.

What issues does this relate to?

Prepares for #162

Why make this change?

We need to allow the in-memory engine to panic when an application misbehaves (such as recording an invalid message) so that the developer can catch these issues. However, when using the engine within a test we want to add information about these panic values to a test report rather than just letting them unwind the stack fully.

Is there anything you are unsure about?

No

@jmalloc jmalloc merged commit 1f58153 into main Nov 22, 2020
@jmalloc jmalloc deleted the panicx branch November 22, 2020 02:42
engine/panicx/location_test.go Show resolved Hide resolved
engine/panicx/unexpectedmessage.go Show resolved Hide resolved
engine/panicx/unexpectedmessage.go Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants