-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
321 inherit from mismatched input (#325)
Fix #321: Make MKPE descend from MismatchedInputException
- Loading branch information
Showing
3 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
src/main/kotlin/com/fasterxml/jackson/module/kotlin/Exceptions.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
package com.fasterxml.jackson.module.kotlin | ||
|
||
import com.fasterxml.jackson.core.JsonParser | ||
import com.fasterxml.jackson.databind.JsonMappingException | ||
import com.fasterxml.jackson.databind.exc.MismatchedInputException | ||
import java.io.Closeable | ||
import kotlin.reflect.KParameter | ||
|
||
/** | ||
* Specialized [JsonMappingException] sub-class used to indicate that a mandatory Kotlin constructor parameter was missing or null. | ||
* Specialized [JsonMappingException] sub-class used to indicate that a mandatory Kotlin constructor | ||
* parameter was missing or null. | ||
*/ | ||
class MissingKotlinParameterException(val parameter: KParameter, val processor: Closeable? = null, val msg: String) : JsonMappingException(processor, msg) | ||
class MissingKotlinParameterException(val parameter: KParameter, | ||
processor: JsonParser? = null, | ||
msg: String) : MismatchedInputException(processor, msg) { | ||
@Deprecated("Use main constructor", ReplaceWith("MissingKotlinParameterException(KParameter, JsonParser?, String)")) | ||
constructor( | ||
parameter: KParameter, | ||
processor: Closeable? = null, | ||
msg: String | ||
) : this(parameter, processor as JsonParser, msg) | ||
} |