From d68678a93e82d35ac1502f952f093b9f4353fa07 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 2 Feb 2015 11:57:32 +1100 Subject: [PATCH] * Add Exception class, OracleError --- spacy/syntax/arc_eager.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spacy/syntax/arc_eager.pyx b/spacy/syntax/arc_eager.pyx index 170b7e465..8a6ac4c88 100644 --- a/spacy/syntax/arc_eager.pyx +++ b/spacy/syntax/arc_eager.pyx @@ -278,5 +278,9 @@ cdef class TransitionSystem: s.stack[0], gold_heads[s.stack[0]], s.i, gold_heads[s.i]] - raise Exception(msg % tuple(fields)) + raise OracleError(msg % tuple(fields)) return t + + +class OracleError(Exception): + pass