Address PR comments
parent
09ae4ac8ac
commit
b3642b1079
|
@ -118,6 +118,8 @@ class DataProxy
|
|||
def log_error(exception, ui_message)
|
||||
elog "#{ui_message}: #{exception.message}"
|
||||
exception.backtrace.each { |line| elog "#{line}" }
|
||||
# TODO: We should try to surface the original exception, instead of just a generic one.
|
||||
# This should not display the full backtrace, only the message.
|
||||
raise Exception, "#{ui_message}: #{exception.message}. See log for more details."
|
||||
end
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ module NmapDataProxy
|
|||
data_service = self.get_data_service()
|
||||
data_service.import_nmap_xml_file(args)
|
||||
rescue Exception => e
|
||||
self.log_error(e, "Problem importing nmap XML file")
|
||||
self.log_error(e, "Problem importing Nmap XML file")
|
||||
end
|
||||
end
|
||||
end
|
|
@ -5,7 +5,7 @@ module VulnDataProxy
|
|||
data_service = self.get_data_service()
|
||||
data_service.report_vuln(opts)
|
||||
rescue Exception => e
|
||||
self.log_error(e, "Problem ")
|
||||
self.log_error(e, "Problem reporting vuln")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue