Skip to content
Snippets Groups Projects
Commit 8621f3a7 authored by florian's avatar florian
Browse files

WIP: new errors in datatype.py

parent d8100717
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
import re import re
from ..exceptions import AmbiguityException, EntityDoesNotExistError from ..exceptions import (AmbiguityException, EntityDoesNotExistError,
TransactionError)
DOUBLE = "DOUBLE" DOUBLE = "DOUBLE"
REFERENCE = "REFERENCE" REFERENCE = "REFERENCE"
...@@ -111,7 +112,8 @@ def get_id_of_datatype(datatype): ...@@ -111,7 +112,8 @@ def get_id_of_datatype(datatype):
"Name {} did not lead to unique result; Missing " "Name {} did not lead to unique result; Missing "
"implementation".format(datatype)) "implementation".format(datatype))
elif len(res) != 1: elif len(res) != 1:
raise EntityDoesNotExistError( ee = EntityDoesNotExistError(
"No RecordType named {}".format(datatype)) "No RecordType named {}".format(datatype))
raise TransactionError(ee)
return res[0].id return res[0].id
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment