{= # # # alert.cfv # # include "templates.util.alert.save_alert_message"; include "templates.util.alert.generate_alert_display"; debug_message("\n\n#### alert.cfv START \n\n"); string alert_id = if (?("command_line.alert_id")) then (command_line.alert_id) else (""); debug_message("\n#### alert_id: " . alert_id . "\n"); string error_message; string error_traceback; string message_file; string traceback_file; if (alert_id eq "") then ( # # # This is a new error, save error_message and error_traceback # # if (?("volatile.error_message")) then ( error_message = volatile.error_message; ); if (?("volatile.error_traceback")) then ( error_traceback = volatile.error_traceback; ); alert_id = save_alert_message(error_message, error_traceback); # # # Display error or send error response if server background call # # if (!(?("volatile.is_server_background_call"))) then ( # # No server background call, display the alert # generate_alert_display(alert_id, error_message, error_traceback); ) else ( # # Error occured in a server background call # "util.errorInServerBackgroundCall.open('" . alert_id . "')\n"; ); ) else ( # # The alert message has already been saved with alert_id, display the alert. # message_file = LOGANALYSISINFO_DIRECTORY . "TemporaryFiles/" . alert_id . "_error_message.txt"; traceback_file = LOGANALYSISINFO_DIRECTORY . "TemporaryFiles/" . alert_id . "_error_traceback.txt"; error_message = read_file(message_file); error_traceback = read_file(traceback_file); generate_alert_display(alert_id, error_message, error_traceback); ); =}