+data UnexpectedEndMethod = UnexpectedEndMethod
+ deriving (Typeable)
+
+instance Show UnexpectedEndMethod where
+ show UnexpectedEndMethod = "endMethod without startMethod!"
+
+instance Exception UnexpectedEndMethod
+
+data ENotLoaded = ClassFileNotLoaded FilePath
+ | JARNotLoaded FilePath String
+ deriving (Typeable)
+
+instance Show ENotLoaded where
+ show (ClassFileNotLoaded p) = "Class file was not loaded: " ++ p
+ show (JARNotLoaded p c) = "Class was not loaded from JAR: " ++ p ++ ": " ++ c
+
+instance Exception ENotLoaded
+
+data ENotFound = ClassNotFound String
+ | FieldNotFound String B.ByteString
+ | MethodNotFound String B.ByteString
+ deriving (Typeable)
+
+instance Show ENotFound where
+ show (ClassNotFound p) = "No such class in ClassPath: " ++ p
+ show (FieldNotFound c f) = "No such field in class " ++ c ++ ": " ++ toString f
+ show (MethodNotFound c m) = "No such method in class " ++ c ++ ": " ++ toString m
+
+instance Exception ENotFound
+