Skip to content

Add IllegalArgumentException and IllegalStateException to ThrowingExceptionsWithoutMessageOrCause#4013

Merged
BraisGabin merged 1 commit intomainfrom
fix-4012
Aug 8, 2021
Merged

Add IllegalArgumentException and IllegalStateException to ThrowingExceptionsWithoutMessageOrCause#4013
BraisGabin merged 1 commit intomainfrom
fix-4012

Conversation

@BraisGabin
Copy link
Member

This two exceptions where removed but I think that we should keep them.

Fix #4012

@BraisGabin BraisGabin added this to the 1.18.0 milestone Aug 7, 2021
@codecov
Copy link

codecov bot commented Aug 7, 2021

Codecov Report

Merging #4013 (29318ad) into main (8abb138) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##               main    #4013   +/-   ##
=========================================
  Coverage     83.55%   83.55%           
  Complexity     3181     3181           
=========================================
  Files           459      459           
  Lines          9083     9085    +2     
  Branches       1771     1771           
=========================================
+ Hits           7589     7591    +2     
  Misses          561      561           
  Partials        933      933           
Impacted Files Coverage Δ
...eptions/ThrowingExceptionsWithoutMessageOrCause.kt 91.66% <100.00%> (+0.75%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8abb138...29318ad. Read the comment docs.

Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

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

What was the reason for removing these exceptions in the first place?

@marschwar
Copy link
Contributor

marschwar commented Aug 7, 2021

Previously the situation was:

/**
 * @configuration exceptions - exceptions which should not be thrown without message or cause
 * (default: `- IllegalArgumentException
 *            - IllegalStateException
 *            - IOException`)
**/
...
        private val exceptionsDefaults = listOf(
            "ArrayIndexOutOfBoundsException",
            "Error",
            "Exception",
            "IllegalMonitorStateException",
            "NullPointerException",
            "IndexOutOfBoundsException",
            "RuntimeException",
            "Throwable"
        )

So there was quite a mismatch between what was configured and what was documented.

@BraisGabin
Copy link
Member Author

Yeah, but if you used the "default config" as "default" you were using the "documentation" instead of the real default values. For that reason I think that it is kind of a regresion.

Copy link
Contributor

@marschwar marschwar left a comment

Choose a reason for hiding this comment

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

Please run gradlew generateDocumentation to update the default config.

@BraisGabin
Copy link
Member Author

Please run gradlew generateDocumentation to update the default config.

Good call!

🤔 we have a problem with CI here, right? Why I'm getting green if I forgot about that?

@marschwar
Copy link
Contributor

That check is gone for quite some time. I have no idea when and why.

@BraisGabin BraisGabin merged commit 7540dc2 into main Aug 8, 2021
@BraisGabin BraisGabin deleted the fix-4012 branch August 8, 2021 08:39
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.

Add more exceptions to ThrowingExceptionsWithoutMessageOrCause

4 participants

Comments