summaryrefslogtreecommitdiff
path: root/larch/nodestore.py
diff options
context:
space:
mode:
Diffstat (limited to 'larch/nodestore.py')
-rw-r--r--larch/nodestore.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/larch/nodestore.py b/larch/nodestore.py
index 82bcfbc..fb0abe0 100644
--- a/larch/nodestore.py
+++ b/larch/nodestore.py
@@ -21,9 +21,14 @@ class NodeMissing(larch.Error):
'''A node cannot be found from a NodeStore.'''
- def __init__(self, node_store, node_id):
- self.msg = ('Node %d cannot be found in the node store %s' %
- (node_id, node_store))
+ def __init__(self, node_store, node_id, error=None):
+ if error is None:
+ error_msg = ''
+ else:
+ error_msg = (': %s: %s: %s' %
+ (error.errno, error.strerror, error.filename))
+ self.msg = ('Node %d cannot be found in the node store %s%s' %
+ (node_id, node_store, error_msg))
class NodeTooBig(larch.Error):