Added line number information to status bar message on parse error.
This commit is contained in:
parent
3f6ba30f3e
commit
89f3d6e3e3
|
@ -1634,7 +1634,7 @@ class App(QtCore.QObject):
|
||||||
raise IOError('Failed to open file: ' + filename)
|
raise IOError('Failed to open file: ' + filename)
|
||||||
|
|
||||||
except ParseError, e:
|
except ParseError, e:
|
||||||
app_obj.inform.emit("[error] Failed to parse file: " + filename)
|
app_obj.inform.emit("[error] Failed to parse file: " + filename + ". " + e[0])
|
||||||
app_obj.progress.emit(0)
|
app_obj.progress.emit(0)
|
||||||
self.log.error(str(e))
|
self.log.error(str(e))
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -300,6 +300,7 @@ class FlatCAMInfoBar(QtGui.QWidget):
|
||||||
|
|
||||||
self.text = QtGui.QLabel(self)
|
self.text = QtGui.QLabel(self)
|
||||||
self.text.setText("Hello!")
|
self.text.setText("Hello!")
|
||||||
|
self.text.setToolTip("Hello!")
|
||||||
|
|
||||||
layout.addWidget(self.text)
|
layout.addWidget(self.text)
|
||||||
|
|
||||||
|
@ -307,6 +308,7 @@ class FlatCAMInfoBar(QtGui.QWidget):
|
||||||
|
|
||||||
def set_text_(self, text):
|
def set_text_(self, text):
|
||||||
self.text.setText(text)
|
self.text.setText(text)
|
||||||
|
self.text.setToolTip(text)
|
||||||
|
|
||||||
def set_status(self, text, level="info"):
|
def set_status(self, text, level="info"):
|
||||||
level = str(level)
|
level = str(level)
|
||||||
|
|
|
@ -14,6 +14,8 @@ from numpy import arctan2, Inf, array, sqrt, pi, ceil, sin, cos, dot, float32, \
|
||||||
from numpy.linalg import solve, norm
|
from numpy.linalg import solve, norm
|
||||||
from matplotlib.figure import Figure
|
from matplotlib.figure import Figure
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
|
import traceback
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
@ -2054,9 +2056,12 @@ class Gerber (Geometry):
|
||||||
self.solid_geometry = self.solid_geometry.difference(new_poly)
|
self.solid_geometry = self.solid_geometry.difference(new_poly)
|
||||||
|
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
|
ex_type, ex, tb = sys.exc_info()
|
||||||
|
traceback.print_tb(tb)
|
||||||
#print traceback.format_exc()
|
#print traceback.format_exc()
|
||||||
|
|
||||||
log.error("PARSING FAILED. Line %d: %s" % (line_num, gline))
|
log.error("PARSING FAILED. Line %d: %s" % (line_num, gline))
|
||||||
raise ParseError("%s\nLine %d: %s" % (repr(err), line_num, gline))
|
raise ParseError("Line %d: %s" % (line_num, gline), repr(err))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_flash_geometry(location, aperture):
|
def create_flash_geometry(location, aperture):
|
||||||
|
|
Loading…
Reference in New Issue