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

Validation exception stacktrace shortened #198

Merged

Conversation

avpotapov00
Copy link
Collaborator

@avpotapov00 avpotapov00 commented Jun 28, 2023

Fixes #140

@avpotapov00 avpotapov00 requested a review from ndkoval June 28, 2023 10:47
@avpotapov00 avpotapov00 self-assigned this Jun 28, 2023
@avpotapov00 avpotapov00 requested a review from ndkoval June 28, 2023 15:35
val validationException = e.cause ?: return e
val wrapperExceptionStackTraceLength = e.stackTrace.size

if (e is InvocationTargetException) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be not an InvocationTargetException?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment explaining when another exception type can be thrown, clarifying why simply returning it is correct. Maybe, we need to throw an internal exception instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@ndkoval ndkoval left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the comment in Utils.kt

Aleksandr.Potapov added 3 commits June 30, 2023 02:07
…-validation-functions

# Conflicts:
#	src/jvm/test/org/jetbrains/kotlinx/lincheck_test/ValidateFunctionTest.kt
#	src/jvm/test/org/jetbrains/kotlinx/lincheck_test/representation/ValidateFunctionTest.kt
@avpotapov00 avpotapov00 requested a review from ndkoval June 30, 2023 10:18
@ndkoval ndkoval merged commit 7d5522c into develop Jun 30, 2023
@ndkoval ndkoval deleted the 140-cut-exception-stack-straces-thrown-in-validation-functions branch June 30, 2023 10:55
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