summaryrefslogtreecommitdiff
path: root/giscanner/message.py
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-10-17 14:55:56 -0400
committerColin Walters <walters@verbum.org>2011-10-17 14:55:56 -0400
commit8e9aee93d024f40d6fa06a20583ac0b7cb845409 (patch)
treecf6c092197eff4dbaecc6925fcbb6d880a6daa2d /giscanner/message.py
parent1a4ecfcb905300e52ba782eee089dc66da75b3fe (diff)
downloadgobject-introspection-8e9aee93d024f40d6fa06a20583ac0b7cb845409.tar.gz
message: Show the file/line even when processing FATAL
This helps debug. Also, add a 'fatal' debug break.
Diffstat (limited to 'giscanner/message.py')
-rw-r--r--giscanner/message.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/giscanner/message.py b/giscanner/message.py
index 1b0e260c..1f7195de 100644
--- a/giscanner/message.py
+++ b/giscanner/message.py
@@ -95,11 +95,11 @@ If the warning is related to a ast.Node type, see log_node_warning()."""
self._warning_count += 1
- if not self._enable_warnings:
- if log_type == FATAL:
- raise SystemExit(text)
+ if not self._enable_warnings and log_type != FATAL:
return
+ # Always drop through on fatal
+
if type(positions) == set:
positions = list(positions)
if isinstance(positions, Position):
@@ -126,10 +126,10 @@ If the warning is related to a ast.Node type, see log_node_warning()."""
text = (
'''%s: %s: %s: %s\n''' % (last_position, error_type, self._namespace.name, text))
+ self._output.write(text)
if log_type == FATAL:
+ utils.break_on_debug_flag('fatal')
raise SystemExit(text)
- else:
- self._output.write(text)
def log_node(self, log_type, node, text, context=None, positions=None):
"""Log a warning, using information about file positions from