register

Registers an error converter using a factory.

This method creates an ErrorConverter instance from the factory and registers it for the factory's supported exception type.

Return

the previously registered converter for this exception type, or null if none existed

Parameters

factory

the factory to create the converter from


fun register(throwableClass: Class<out Throwable>, errorConverter: ErrorConverter<Throwable>): ErrorConverter<Throwable>?

Registers an error converter for a specific exception type.

This method directly registers a converter instance for the given exception class. If a converter was already registered for this type, it will be replaced.

Return

the previously registered converter for this exception type, or null if none existed

Parameters

throwableClass

the exception class this converter handles

errorConverter

the converter to register