try:
to_be_parsed, module_dict = loadModuleDefinition(comment_list[0])
except ParseError, err:
- raise DefineException.ModuleDefineException(path, err.line_number, err.line)
+ raise DefineException.ModuleDefineException(os.path.join(path, filename), err.line_number, err.line)
for module, information in module_dict.items():
if "depends" not in information:
information["depends"] = ()
list_dict = loadDefineLists(comment_list[1:])
list_info_dict.update(list_dict)
except ParseError, err:
- raise DefineException.EnumDefineException(path, err.line_number, err.line)
+ raise DefineException.EnumDefineException(os.path.join(path, filename), err.line_number, err.line)
for tag in self.infos["CPU_INFOS"]["CPU_TAGS"]:
for filename, path in self.findDefinitions("*_" + tag + ".h"):
comment_list = getCommentList(open(path + "/" + filename, "r").read())
from BCreationPage import BCreationPage
from BToolchainPage import BToolchainPage
+from DefineException import ModuleDefineException
+
from bertos_utils import _cmp
from toolchain_manager import ToolchainManager
preset_path = self.selected_path
try:
QApplication.instance().setOverrideCursor(Qt.WaitCursor)
- self.project.loadProjectFromPreset(preset_path)
+ try:
+ self.project.loadProjectFromPreset(preset_path)
+ except ModuleDefineException, e:
+ self.exceptionOccurred(self.tr("Error parsing line '%2' in file %1").arg(e.path).arg(e.line))
self.setProjectInfo("PRESET_LOADED", True)
finally:
QApplication.instance().restoreOverrideCursor()