Skip to content

Commit

Permalink
Remove unnecessary information from preview errors
Browse files Browse the repository at this point in the history
The additional information was introduced by accident in #376 when implementing #373 to add a timeout for generating values. Error messages in the preview (and other places) would contain the full name of the exception that caused the error, which is completely unnecessary.

This fix was originally implemented in the `uds` branch, but I decided to add a "backports" branch for fixes I might want to release in a v2.x.x release before releasing v3.0.0.
  • Loading branch information
FWDekker committed Aug 2, 2021
1 parent f06f8a3 commit 7013c5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/com/fwdekker/randomness/DataActions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ abstract class DataInsertAction(private val icon: Icon) : AnAction() {
} catch (e: TimeoutException) {
throw DataGenerationException("Timed out while generating data.", e)
} catch (e: ExecutionException) {
throw DataGenerationException(e.message, e)
throw DataGenerationException(e.cause?.message ?: e.message, e)
} finally {
executor.shutdown()
}
Expand Down

0 comments on commit 7013c5f

Please sign in to comment.