From 86368e7ac0565f965a71cfa50b0bcfcb38046609 Mon Sep 17 00:00:00 2001 From: pabs3 Date: Sun, 8 Nov 2009 06:39:37 +0000 Subject: [PATCH] Raising strings is deprecated in Python 2.5, raise an exception instead. git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@569 4cde692c-a291-49d1-8350-778aa11640f8 --- Lib/fontTools/ttLib/tables/ttProgram.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/fontTools/ttLib/tables/ttProgram.py b/Lib/fontTools/ttLib/tables/ttProgram.py index 268366927..ec828a5f8 100644 --- a/Lib/fontTools/ttLib/tables/ttProgram.py +++ b/Lib/fontTools/ttLib/tables/ttProgram.py @@ -173,7 +173,11 @@ def _makeDict(instructionList): streamOpcodeDict, streamMnemonicDict = _makeDict(streamInstructions) opcodeDict, mnemonicDict = _makeDict(instructions) -tt_instructions_error = "TT instructions error" +class tt_instructions_error(Exception): + def __init__(self, error): + self.error = error + def __str__(self): + return "TT instructions error: %s" % repr(self.error) _comment = r"/\*.*?\*/"