Skip to content

Add fallback factory #25

@RezMike

Description

@RezMike

Now you can only specify a fallback value:

ExceptionMappersStorage.setFallbackValue(MR.strings.common_unknownError.desc())

Another option is to add a fallback factory:

ExceptionMappersStorage.setFallbackFactory { error : Throwable ->
    if (error.message.isNullOrBlank()) {
        MR.strings.common_unknownError.desc()
    } else {
        error.message!!.desc()
    }
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions