Commit 86a24969 authored by Dato Simó's avatar Dato Simó
Browse files

Errors.hs: improve field names for ConfigVersionMismatch



Change {exp,act}Code to {exp,act}Ver, which gives a better idea that
the integer fields represent version numbers.

Also:

  - errors.py: update OpPrereqError's docstring to note that an error
    code is always expected as the second argument (it was previously
    optional).
Signed-off-by: default avatarDato Simó <dato@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent cd93a0ec
......@@ -67,8 +67,8 @@ $(genException "GanetiException"
, ("ProgrammerError", [excErrMsg])
, ("BlockDeviceError", [excErrMsg])
, ("ConfigurationError", [excErrMsg])
, ("ConfigVersionMismatch", [ ("expCode", [t| Int |])
, ("actCode", [t| Int |])])
, ("ConfigVersionMismatch", [ ("expVer", [t| Int |])
, ("actVer", [t| Int |])])
, ("ReservationError", [excErrMsg])
, ("RemoteError", [excErrMsg])
, ("SignatureError", [excErrMsg])
......
......@@ -169,8 +169,7 @@ class ResultValidationError(GenericError):
class OpPrereqError(GenericError):
"""Prerequisites for the OpCode are not fulfilled.
This exception will have either one or two arguments. For the
two-argument construction, the second argument should be one of the
This exception has two arguments: an error message, and one of the
ECODE_* codes.
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment