lib/metadataprotocol.js
function writeSimpleException(requestId, requestType, exceptionMessage, exceptionType) {
	return protocol.implodeMessage(requestId, requestType,
		protocol.encodeMetadataException(exceptionType),
		protocol.encodeString(exceptionMessage));
}
function writeSimpleException(requestId, requestType, exceptionMessage, exceptionType) {
	return protocol.implodeMessage(requestId, requestType,
		protocol.encodeMetadataException(exceptionType),
		protocol.encodeString(exceptionMessage));
}
function writeSimpleException ( requestId , requestType , exceptionMessage , exceptionType ) { return protocol . implodeMessage ( requestId , requestType , protocol . encodeMetadataException ( exceptionType ) , protocol . encodeString ( exceptionMessage ) ) ; }
Encodes an unsuccessful reply.

@param {String} requestId the originating request id
@param {String} requestType the originating request method name
@param {String} exceptionMessage the exception message
@param {String} [exceptionType] the exception type. Allowed values: access, credits
@return {String} the encoded message
@private
Encodes an unsuccessful reply .