-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python/sdk: Improve error handling and logging for ObjectFile
Signed-off-by: Aaron Wilson <aawilson@nvidia.com>
- Loading branch information
Showing
3 changed files
with
90 additions
and
11 deletions.
There are no files selected for viewing
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
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,25 @@ | ||
# | ||
# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. | ||
# | ||
|
||
|
||
class ObjectFileMaxResumeError(Exception): | ||
""" | ||
Raised when ObjectFile has exceeded the max number of stream resumes for an object | ||
""" | ||
|
||
def __init__(self, err, max_retries): | ||
self.original_error = err | ||
super().__init__( | ||
f"Object file exceeded max number of stream resumptions: {max_retries}" | ||
) | ||
|
||
|
||
class ObjectFileStreamError(Exception): | ||
""" | ||
Raised when ObjectFile fails to establish a stream for an object | ||
""" | ||
|
||
def __init__(self, err): | ||
self.original_error = err | ||
super().__init__("Object file failed to establish stream connection") |
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