檢視原始碼 snmpa_error_report 行為 (snmp v5.18)

用於報告 SNMP 代理程式錯誤的行為模組

此模組定義了代理程式錯誤報告的行為。一個符合 snmpa_error_report 的模組必須匯出以下函式

  • config_err/2
  • user_err/2

它們的語義及其確切的簽名將在下面說明。

摘要

回呼函式

如果在配置階段發生錯誤時會呼叫此函式,例如在設定檔中發現語法錯誤。

如果在執行時發生使用者相關錯誤時會呼叫此函式,例如當使用者定義的檢測函式返回錯誤時。

回呼函式

-callback config_err(Format, Args) -> snmp:void() when Format :: string(), Args :: [term()].

如果在配置階段發生錯誤時會呼叫此函式,例如在設定檔中發現語法錯誤。

FormatArgsio:format(Format, Args) 中的相同。

-callback user_err(Format, Args) -> snmp:void() when Format :: string(), Args :: [term()].

如果在執行時發生使用者相關錯誤時會呼叫此函式,例如當使用者定義的檢測函式返回錯誤時。

FormatArgsio:format(Format, Args) 中的相同。