throwMalformedMessageException

fun throwMalformedMessageException(errorCode: AvailErrorCode, errorMessage: String): Nothing

Throw a MalformedMessageException with the given error code.

Return

Nothing, but pretend it's the MalformedMessageException that was thrown so that the caller can pretend to throw it again to indicate to Java that this call terminates the control flow unconditionally.

Parameters

errorCode

The AvailErrorCode that indicates the problem.

errorMessage

A description of the problem.

Throws

Always, with the given error code and diagnostic message.