From 1d3fd053d4f76633567e321528b894ed1f727b73 Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Tue, 9 Nov 2010 17:28:47 -0800 Subject: make commit aware of error location key and allow for passthrough. --- lib/Vyatta/Config.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Vyatta') diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index e8fda29..5283b06 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -676,13 +676,13 @@ sub compareValueLists { return %comp_hash; } + sub outputError { my ($location, $msg) = @_; - print STDERR $msg . "\n"; if (defined($ENV{VYATTA_OUTPUT_ERROR_LOCATION})) { - foreach my $elem (@$location) { - print STDERR "errloc:[" . $elem . "]\n"; - } + foreach my $elem (@$location) { + print STDERR "_errloc_:[" . $elem . "]\n" . $msg . "\n"; + } } } -- cgit v1.2.3 From e146bb9a234e45125e8237ca4c099cb18bd2459e Mon Sep 17 00:00:00 2001 From: Michael Larson Date: Tue, 9 Nov 2010 18:00:52 -0800 Subject: additional change in support of error location. --- lib/Vyatta/Config.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Vyatta') diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm index 5283b06..28326dd 100755 --- a/lib/Vyatta/Config.pm +++ b/lib/Vyatta/Config.pm @@ -684,6 +684,9 @@ sub outputError { print STDERR "_errloc_:[" . $elem . "]\n" . $msg . "\n"; } } + else { + print STDERR $msg . "\n"; + } } ############################################################ -- cgit v1.2.3