-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
6,655 additions
and
203 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import os | ||
import sys | ||
sys.path.insert(0, os.path.dirname(__file__)) | ||
|
||
__version__ = "1.0.0" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# /* | ||
# * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# * | ||
# * Licensed under the Apache License, Version 2.0 (the "License"). | ||
# * You may not use this file except in compliance with the License. | ||
# * A copy of the License is located at | ||
# * | ||
# * http://aws.amazon.com/apache2.0 | ||
# * | ||
# * or in the "license" file accompanying this file. This file is distributed | ||
# * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
# * express or implied. See the License for the specific language governing | ||
# * permissions and limitations under the License. | ||
# */ | ||
|
||
import core.exception.operationTimeoutException as operationTimeoutException | ||
import core.exception.operationError as operationError | ||
|
||
|
||
# Serial Exception | ||
class acceptTimeoutException(Exception): | ||
def __init__(self, msg="Accept Timeout"): | ||
self.message = msg | ||
|
||
|
||
# MQTT Operation Timeout Exception | ||
class connectTimeoutException(operationTimeoutException.operationTimeoutException): | ||
def __init__(self, msg="Connect Timeout"): | ||
self.message = msg | ||
|
||
|
||
class disconnectTimeoutException(operationTimeoutException.operationTimeoutException): | ||
def __init__(self, msg="Disconnect Timeout"): | ||
self.message = msg | ||
|
||
|
||
class publishTimeoutException(operationTimeoutException.operationTimeoutException): | ||
def __init__(self, msg="Publish Timeout"): | ||
self.message = msg | ||
|
||
|
||
class subscribeTimeoutException(operationTimeoutException.operationTimeoutException): | ||
def __init__(self, msg="Subscribe Timeout"): | ||
self.message = msg | ||
|
||
|
||
class unsubscribeTimeoutException(operationTimeoutException.operationTimeoutException): | ||
def __init__(self, msg="Unsubscribe Timeout"): | ||
self.message = msg | ||
|
||
|
||
# MQTT Operation Error | ||
class connectError(operationError.operationError): | ||
def __init__(self, errorCode): | ||
self.message = "Connect Error: " + str(errorCode) | ||
|
||
|
||
class disconnectError(operationError.operationError): | ||
def __init__(self, errorCode): | ||
self.message = "Disconnect Error: " + str(errorCode) | ||
|
||
|
||
class publishError(operationError.operationError): | ||
def __init__(self, errorCode): | ||
self.message = "Publish Error: " + str(errorCode) | ||
|
||
|
||
class publishQueueFullException(operationError.operationError): | ||
def __init__(self): | ||
self.message = "Internal Publish Queue Full" | ||
|
||
|
||
class publishQueueDisabledException(operationError.operationError): | ||
def __init__(self): | ||
self.message = "Offline publish request dropped because queueing is disabled" | ||
|
||
|
||
class subscribeError(operationError.operationError): | ||
def __init__(self, errorCode): | ||
self.message = "Subscribe Error: " + str(errorCode) | ||
|
||
|
||
class unsubscribeError(operationError.operationError): | ||
def __init__(self, errorCode): | ||
self.message = "Unsubscribe Error: " + str(errorCode) | ||
|
||
|
||
# Websocket Error | ||
class wssNoKeyInEnvironmentError(operationError.operationError): | ||
def __init__(self): | ||
self.message = "No AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY detected in $ENV." | ||
|
||
|
||
class wssHandShakeError(operationError.operationError): | ||
def __init__(self): | ||
self.message = "Error in WSS handshake." |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# /* | ||
# * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# * | ||
# * Licensed under the Apache License, Version 2.0 (the "License"). | ||
# * You may not use this file except in compliance with the License. | ||
# * A copy of the License is located at | ||
# * | ||
# * http://aws.amazon.com/apache2.0 | ||
# * | ||
# * or in the "license" file accompanying this file. This file is distributed | ||
# * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
# * express or implied. See the License for the specific language governing | ||
# * permissions and limitations under the License. | ||
# */ | ||
|
||
|
||
class operationError(Exception): | ||
def __init__(self, msg="Operation Error"): | ||
self.message = msg |
19 changes: 19 additions & 0 deletions
19
AWSIoTPythonSDK/core/exception/operationTimeoutException.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# /* | ||
# * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# * | ||
# * Licensed under the Apache License, Version 2.0 (the "License"). | ||
# * You may not use this file except in compliance with the License. | ||
# * A copy of the License is located at | ||
# * | ||
# * http://aws.amazon.com/apache2.0 | ||
# * | ||
# * or in the "license" file accompanying this file. This file is distributed | ||
# * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
# * express or implied. See the License for the specific language governing | ||
# * permissions and limitations under the License. | ||
# */ | ||
|
||
|
||
class operationTimeoutException(Exception): | ||
def __init__(self, msg="Operation Timeout"): | ||
self.message = msg |
Empty file.
Oops, something went wrong.