ross_a
11/24/2016, 5:18 PMtry {
someDomainParsingOperation(valueFromHttpRequest)
} catch(e: Exception) {
throw when(e) {
is SomeDomainException -> SomeHttpEndpointException()
is AnotherDomainException -> AnotherHttpEndpointException()
else -> DefaultHttpEndpointException()
}
}