Bug 565844: Distinguish between illegal-value and couldn't-process errors in IPDL error messages. r=bent

This commit is contained in:
Chris Jones 2010-05-22 14:35:29 -05:00
parent c59fbce1fb
commit 39eb188564
3 changed files with 5 additions and 1 deletions

View File

@ -384,6 +384,8 @@ AsyncChannel::MaybeHandleError(Result code, const char* channelName)
case MsgPayloadError:
errorMsg = "Payload error: message could not be deserialized";
break;
case MsgProcessingError:
errorMsg = "Processing error: message was deserialized, but the handler returned false (indicating failure)";
case MsgRouteError:
errorMsg = "Route error: message sent to unknown actor ID";
break;

View File

@ -60,6 +60,7 @@ struct HasResultCodes
MsgNotKnown,
MsgNotAllowed,
MsgPayloadError,
MsgProcessingError,
MsgRouteError,
MsgValueError,
};

View File

@ -410,6 +410,7 @@ class _Result:
NotKnown = ExprVar('MsgNotKnown')
NotAllowed = ExprVar('MsgNotAllowed')
PayloadError = ExprVar('MsgPayloadError')
ProcessingError = ExprVar('MsgProcessingError')
RouteError = ExprVar('MsgRouteError')
ValuError = ExprVar('MsgValueError') # [sic]
@ -4238,7 +4239,7 @@ class _GenerateProtocolActorCode(ipdl.ast.Visitor):
args=md.makeCxxArgs(params=1,
retsems='in', retcallsems='out',
implicit=implicit))))
failif.addifstmt(StmtReturn(_Result.ValuError))
failif.addifstmt(StmtReturn(_Result.ProcessingError))
return [ failif ]
def makeDtorMethodDecl(self, md):