summaryrefslogtreecommitdiff
path: root/lib/Automake/Channels.pm
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2002-09-10 20:45:58 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2002-09-10 20:45:58 +0000
commitfcdc5da2aa2b8310244391b704778d368308fd17 (patch)
treed19e1d71d5fee23a6ebeaf3b0c57ca3f2950c148 /lib/Automake/Channels.pm
parentb85946127c0c08a2a8913162cf47bb2b8f50de53 (diff)
downloadautomake-fcdc5da2aa2b8310244391b704778d368308fd17.tar.gz
* lib/Automake/Channels.pm (_default_options): Add `backtrace'.
(msg): Die with backtrace if requested. * automake.in: Enable `backtrace' on the `automake' channel.
Diffstat (limited to 'lib/Automake/Channels.pm')
-rw-r--r--lib/Automake/Channels.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm
index 31361081e..13adb6bbd 100644
--- a/lib/Automake/Channels.pm
+++ b/lib/Automake/Channels.pm
@@ -186,6 +186,10 @@ A string to prepend to each message emitted through this channel.
A string to append to each message emitted through this channel.
+=item C<backtrace =E<gt> 0>
+
+Die with a stack backtrace after displaying the message.
+
=back
=cut
@@ -201,6 +205,7 @@ our %_default_options =
uniq_part => UP_LOC_TEXT,
header => '',
footer => '',
+ backtrace => 0,
);
# Filled with output messages as keys, to detect duplicates.
@@ -468,6 +473,7 @@ sub msg ($$;$%)
}
# Die on fatal messages.
+ confess if $opts{'backtrace'};
exit $exit_code if $opts{'type'} eq 'fatal';
}
}