Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ipaaca
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Social Cognitive Systems
ipaaca
Commits
1556fe99
Commit
1556fe99
authored
10 years ago
by
Hendrik Buschmeier
Browse files
Options
Downloads
Patches
Plain Diff
Added generic exception IpaacaError.
parent
171c0854
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ipaacalib/python/src/ipaaca/exception.py
+12
-8
12 additions, 8 deletions
ipaacalib/python/src/ipaaca/exception.py
with
12 additions
and
8 deletions
ipaacalib/python/src/ipaaca/exception.py
+
12
−
8
View file @
1556fe99
...
...
@@ -34,6 +34,7 @@ from __future__ import division, print_function
__all__
=
[
'
IpaacaError
'
,
'
IUCommittedError
'
,
'
IUNotFoundError
'
,
'
IUPayloadLockedError
'
,
...
...
@@ -45,49 +46,52 @@ __all__ = [
]
class
IUCommittedError
(
Exception
):
class
IpaacaError
(
Exception
):
pass
class
IUCommittedError
(
IpaacaError
):
"""
Error indicating that an IU is immutable because it has been committed to.
"""
def
__init__
(
self
,
iu
):
super
(
IUCommittedError
,
self
).
__init__
(
'
Writing to IU
'
+
str
(
iu
.
uid
)
+
'
failed -- it has been committed to.
'
)
class
IUNotFoundError
(
Exception
):
class
IUNotFoundError
(
IpaacaError
):
"""
Error indicating that an IU UID was unexpectedly not found in an internal store.
"""
def
__init__
(
self
,
iu_uid
):
super
(
IUNotFoundError
,
self
).
__init__
(
'
Lookup of IU
'
+
str
(
iu_uid
)
+
'
failed.
'
)
class
IUPayloadLockTimeoutError
(
Exception
):
class
IUPayloadLockTimeoutError
(
IpaacaError
):
"""
Error indicating that exclusive access to the Payload could not be obtained in time.
"""
def
__init__
(
self
,
iu
):
super
(
IUPayloadLockTimeoutError
,
self
).
__init__
(
'
Timeout while accessing payload of IU
'
+
str
(
iu
.
uid
)
+
'
.
'
)
class
IUPayloadLockedError
(
Exception
):
class
IUPayloadLockedError
(
IpaacaError
):
"""
Error indicating that exclusive access to the Payload could not be obtained because someone actually locked it.
"""
def
__init__
(
self
,
iu
):
super
(
IUPayloadLockedError
,
self
).
__init__
(
'
IU
'
+
str
(
iu
.
uid
)
+
'
was locked during access attempt.
'
)
class
IUPublishedError
(
Exception
):
class
IUPublishedError
(
IpaacaError
):
"""
Error publishing of an IU failed since it is already in the buffer.
"""
def
__init__
(
self
,
iu
):
super
(
IUPublishedError
,
self
).
__init__
(
'
IU
'
+
str
(
iu
.
uid
)
+
'
is already present in the output buffer.
'
)
class
IUReadOnlyError
(
Exception
):
class
IUReadOnlyError
(
IpaacaError
):
"""
Error indicating that an IU is immutable because it is
'
read only
'
.
"""
def
__init__
(
self
,
iu
):
super
(
IUReadOnlyError
,
self
).
__init__
(
'
Writing to IU
'
+
str
(
iu
.
uid
)
+
'
failed -- it is read-only.
'
)
class
IUResendRequestFailedError
(
Exception
):
class
IUResendRequestFailedError
(
IpaacaError
):
"""
Error indicating that a remote IU resend failed.
"""
def
__init__
(
self
,
iu
):
super
(
IUResendFailedError
,
self
).
__init__
(
'
Remote resend failed for IU
'
+
str
(
iu
.
uid
)
+
'
.
'
)
class
IUUpdateFailedError
(
Exception
):
class
IUUpdateFailedError
(
IpaacaError
):
"""
Error indicating that a remote IU update failed.
"""
def
__init__
(
self
,
iu
):
super
(
IUUpdateFailedError
,
self
).
__init__
(
'
Remote update failed for IU
'
+
str
(
iu
.
uid
)
+
'
.
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment