Bug 1084125: Add in SessionNotCreatedException to marionette; r=chmanchester

--HG--
extra : rebase_source : 669c304e8f1d20e71d7523ea8f561d9fde0c1ad9
This commit is contained in:
David Burns 2015-02-06 21:42:24 +00:00
Родитель 03b46b7f62
Коммит 8f765df2a5
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -32,6 +32,7 @@ class ErrorCodes(object):
INVALID_RESPONSE = 53
FRAME_SEND_NOT_INITIALIZED_ERROR = 54
FRAME_SEND_FAILURE_ERROR = 55
SESSION_NOT_CREATED = 71
UNSUPPORTED_OPERATION = 405
MARIONETTE_ERROR = 500
@ -146,3 +147,6 @@ class FrameSendFailureError(MarionetteException):
class UnsupportedOperationException(MarionetteException):
pass
class SessionNotCreatedException(MarionetteException):
pass

Просмотреть файл

@ -713,6 +713,8 @@ class Marionette(object):
raise errors.FrameSendFailureError(message=message, status=status, stacktrace=stacktrace)
elif status == errors.ErrorCodes.UNSUPPORTED_OPERATION:
raise errors.UnsupportedOperationException(message=message, status=status, stacktrace=stacktrace)
elif status == errors.ErrorCodes.SESSION_NOT_CREATED:
raise errors.SessionNotCreatedException(message=message, status=status, stacktrace=stacktrace)
else:
raise errors.MarionetteException(message=message, status=status, stacktrace=stacktrace)