#NEWLINE# def raise_415( instance , msg = None ) : #NEWLINE# #INDENT# "Abort the current request with a 415 (Unsupported Media Type) response\n    code. If the message is given it's output as an error message in the\n    response body (correctly converted to the requested MIME type).\n\n    :param instance: Resource instance (used to access the response)\n    :type instance: :class:`webob.resource.Resource`\n    :raises: :class:`webob.exceptions.ResponseException` of status 415\n    " #NEWLINE# instance . response . status = 415 #NEWLINE# if instance : #NEWLINE# #INDENT# instance . response . body_raw = { #NEWLINE# #INDENT# 'error' : msg , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# raise ResponseException ( instance . response )