Fix up one missing exception change.

This commit is contained in:
Mike Auty
2016-07-02 14:53:41 +01:00
parent 5290baf73d
commit 8c6e7918ee
+3 -1
View File
@@ -133,7 +133,9 @@ class TranslationLayerInterface(DataLayerInterface, metaclass = ABCMeta):
length = len(value)
for (offset, mapped_offset, length, layer) in self.mapping(offset, length):
if offset > current_offset:
raise exceptions.InvalidAddressException("Layer " + self.name + " cannot map offset " + current_offset)
raise exceptions.InvalidAddressException(self.name, current_offset,
"Layer " + self.name + " cannot map offset " +
str(current_offset))
elif offset < current_offset:
raise exceptions.LayerException("Mapping returned an overlapping element")
self._context.memory.write(layer, mapped_offset, length)