When a plugin thows an error, print out the message in addition to the
line number
This commit is contained in:
parent
a1da4bcee8
commit
fbe5a760f7
|
@ -37,7 +37,7 @@ class Plugin:
|
||||||
return self.run(args)
|
return self.run(args)
|
||||||
|
|
||||||
# Find out information about the error
|
# Find out information about the error
|
||||||
except:
|
except Exception,e:
|
||||||
trace = inspect.trace()
|
trace = inspect.trace()
|
||||||
frame = trace[len(trace)-1]
|
frame = trace[len(trace)-1]
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class Plugin:
|
||||||
lineno = str(frame[2])
|
lineno = str(frame[2])
|
||||||
|
|
||||||
filename = filename.rsplit(os.sep,1)[1]
|
filename = filename.rsplit(os.sep,1)[1]
|
||||||
write(filename+" ("+lineno+")")
|
write(filename+" ("+lineno+"): "+str(e))
|
||||||
|
|
||||||
|
|
||||||
def run(self,args=None):
|
def run(self,args=None):
|
||||||
|
|
Loading…
Reference in New Issue