First file:
class E1Exception (Exception):
def __init__(self,x):
self.x=x
def raiser (self,x):
self.x=x
if x=='So sue me':
raise E1Exception('New Yorker')
else:
try:
number = (int)(x)
pass
except ValueError:
raise ValueError ()
Second file:
import e1a
from e1a import *
def reporter (f,x):
try:
print f(x)
return ('no problem')
except ValueError:
return ('Value')
except E1Exception:
return ('E1')
else:
return ('generic')
Question 1:
Does the function raiser have to be static in order to be used in the second file?
The problem is the E1Exception is never caught any solution?