mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Added traceback in case of nil score
This commit is contained in:
parent
3db8cc6cc8
commit
3f214341ea
18 changed files with 31 additions and 19 deletions
|
|
@ -5517,6 +5517,18 @@ function format_name_value(name, value, shorten)
|
|||
return formatted_name_value
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function map_score_to_severity(score)
|
||||
if score ~= nil then
|
||||
return ntop.mapScoreToSeverity(score)
|
||||
end
|
||||
|
||||
traceError(TRACE_ERROR, TRACE_CONSOLE, "Nil score value instead of number")
|
||||
tprint(debug.traceback())
|
||||
|
||||
return ntop.mapScoreToSeverity(0)
|
||||
end
|
||||
--
|
||||
-- IMPORTANT
|
||||
-- Leave it at the end so it can use the functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue