summaryrefslogtreecommitdiff
path: root/misc/pylib/booleanOperations/exceptions.py
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2017-09-04 06:03:17 +0300
committerRasmus Andersson <rasmus@notion.se>2017-09-04 18:12:34 +0300
commit8234b62ab762637ef24c3398b4204a8ce8db31a7 (patch)
tree1c8df547021cdb58951630a015e4101ede46dbf1 /misc/pylib/booleanOperations/exceptions.py
parent31ae014e0c827dd76696fdab7e4ca3fed9f6402b (diff)
downloadinter-8234b62ab762637ef24c3398b4204a8ce8db31a7.tar.xz
Speeds up font compilation by around 200%
Cython is used to compile some hot paths into native Python extensions. These hot paths were identified through running ufocompile with the hotshot profiler and then converting file by file to Cython, starting with the "hottest" paths and continuing until returns were deminishing. This means that only a few Python files were converted to Cython. Closes #23 Closes #20 (really this time)
Diffstat (limited to 'misc/pylib/booleanOperations/exceptions.py')
-rw-r--r--misc/pylib/booleanOperations/exceptions.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/misc/pylib/booleanOperations/exceptions.py b/misc/pylib/booleanOperations/exceptions.py
new file mode 100644
index 000000000..23028b207
--- /dev/null
+++ b/misc/pylib/booleanOperations/exceptions.py
@@ -0,0 +1,21 @@
+from __future__ import print_function, division, absolute_import
+
+
+class BooleanOperationsError(Exception):
+ """Base BooleanOperations exception"""
+
+
+class InvalidContourError(BooleanOperationsError):
+ """Rased when any input contour is invalid"""
+
+
+class InvalidSubjectContourError(InvalidContourError):
+ """Rased when a 'subject' contour is not valid"""
+
+
+class InvalidClippingContourError(InvalidContourError):
+ """Rased when a 'clipping' contour is not valid"""
+
+
+class ExecutionError(BooleanOperationsError):
+ """Raised when clipping execution fails"""