Commit 13965275 authored by Kevin Atkinson's avatar Kevin Atkinson

Nuke report_context code as it's more trouble than it's worth. It is

The code is not used for anything important at all.
parent 5bceee68
...@@ -970,18 +970,26 @@ sub tbreport( $@ ) { ...@@ -970,18 +970,26 @@ sub tbreport( $@ ) {
DBQueryFatal($sql); DBQueryFatal($sql);
if (@context > 0) { # XXX: Nuke for now, not used for anything important and is more
croak("$error_type has no associated entry in CONTEXT_MAP") # trouble than it's worth. If ever reenabled the arguments
unless defined(CONTEXT_MAP->{$error_type}); # should be checked and a useful error message should be
# returned if they are invalid. Also DBQueryFatal should
my ($table, @columns) = @{CONTEXT_MAP->{$error_type}}; # probably not be used, instead DBQuery should be used and
# special action should be taken on error as done in
my $sql = sprintf("insert into %s (seq, " . join(', ', @columns) . # dblog_real to avoid generating the DBError email. Ditto
") values(%d" . ", %s" x @columns . ")", # for the DBQueryFatal above (for report_error). -- kevina
$table, $seq, map(DBQuoteSpecial($_), @context)); #if (@context > 0) {
# croak("$error_type has no associated entry in CONTEXT_MAP")
DBQueryFatal($sql); # unless defined(CONTEXT_MAP->{$error_type});
} #
# my ($table, @columns) = @{CONTEXT_MAP->{$error_type}};
#
# my $sql = sprintf("insert into %s (seq, " . join(', ', @columns) .
# ") values(%d" . ", %s" x @columns . ")",
# $table, $seq, map(DBQuoteSpecial($_), @context));
#
# DBQueryFatal($sql);
#}
}; };
# Print a warning on failure but don't log the results to the database # Print a warning on failure but don't log the results to the database
# as that is likely to fail also # as that is likely to fail also
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment