Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
47dc7734
Commit
47dc7734
authored
Sep 11, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug flag for raising an exception on an error.
parent
4658cbdc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Cython/Compiler/DebugFlags.py
Cython/Compiler/DebugFlags.py
+7
-4
Cython/Compiler/Errors.py
Cython/Compiler/Errors.py
+2
-1
No files found.
Cython/Compiler/DebugFlags.py
View file @
47dc7734
...
@@ -3,14 +3,17 @@ debug_temp_alloc = 0
...
@@ -3,14 +3,17 @@ debug_temp_alloc = 0
debug_coercion
=
0
debug_coercion
=
0
# Write comments into the C code that show where temporary variables
# Write comments into the C code that show where temporary variables
# are allocated and released
# are allocated and released
.
debug_temp_code_comments
=
0
debug_temp_code_comments
=
0
# Write a call trace of the code generation phase into the C code
# Write a call trace of the code generation phase into the C code
.
debug_trace_code_generation
=
0
debug_trace_code_generation
=
0
# Do not replace exceptions with user-friendly error messages
# Do not replace exceptions with user-friendly error messages
.
debug_no_exception_intercept
=
0
debug_no_exception_intercept
=
0
# Print a message each time a new stage in the pipeline is entered
# Print a message each time a new stage in the pipeline is entered
.
debug_verbose_pipeline
=
0
debug_verbose_pipeline
=
0
# Raise an exception when an error is encountered.
debug_exception_on_error
=
0
Cython/Compiler/Errors.py
View file @
47dc7734
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
import
sys
import
sys
from
Cython.Utils
import
open_new_file
from
Cython.Utils
import
open_new_file
from
DebugFlags
import
debug_exception_on_error
class
PyrexError
(
Exception
):
class
PyrexError
(
Exception
):
...
@@ -143,7 +144,7 @@ def error(position, message):
...
@@ -143,7 +144,7 @@ def error(position, message):
if
position
is
None
:
if
position
is
None
:
raise
InternalError
(
message
)
raise
InternalError
(
message
)
err
=
CompileError
(
position
,
message
)
err
=
CompileError
(
position
,
message
)
#if position is not None
: raise Exception(err) # debug
if
debug_exception_on_error
:
raise
Exception
(
err
)
# debug
report_error
(
err
)
report_error
(
err
)
return
err
return
err
...
...
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