Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
3da1e2e7
Commit
3da1e2e7
authored
Jan 27, 2012
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve syntax error message.
parent
53908b6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
product/ERP5Type/Core/Component.py
product/ERP5Type/Core/Component.py
+7
-1
No files found.
product/ERP5Type/Core/Component.py
View file @
3da1e2e7
...
@@ -68,12 +68,18 @@ class Component(Base):
...
@@ -68,12 +68,18 @@ class Component(Base):
message
=
"No source code"
,
message
=
"No source code"
,
mapping
=
{})]
mapping
=
{})]
message
=
None
try
:
try
:
self
.
load
()
self
.
load
()
except
SyntaxError
,
e
:
message
=
"%s (line: %d, column: %d)"
%
(
e
.
msg
,
e
.
lineno
,
e
.
offset
)
except
Exception
,
e
:
except
Exception
,
e
:
message
=
str
(
e
)
if
message
:
return
[
ConsistencyMessage
(
self
,
return
[
ConsistencyMessage
(
self
,
object_relative_url
=
self
.
getRelativeUrl
(),
object_relative_url
=
self
.
getRelativeUrl
(),
message
=
"Source
code error: %s"
%
e
,
message
=
"Source
Code: %s"
%
messag
e
,
mapping
=
{})]
mapping
=
{})]
return
[]
return
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment