snmpa_error_io(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

✨ snmpa_error_io ✨

okay bestie, welcome to the snmpa_error_io page from the Erlang Module Definition squad (yes, that's the manual name, slay) πŸ’–


πŸŽ€ NAME πŸŽ€

snmpa_error_io β€” functions for reporting SNMP errors on stdio. it's giving "glow up your error output" energy πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so like, the module snmpa_error_io implements the snmp_error_report behaviour (go peek at snmpa_error_report for the full tea πŸ“) and inside it there are two callback functions that get called whenever somebody needs to report an SNMP error. two. that's it. iconic honestly ✨

this module is a simple mechanism for reporting SNMP errors β€” errors get written to stdout using the io module. that's the whole thing. it's provided as a simple example, so think of it as the starter pack, not the final boss 🫢

heads up bestie: this module needs to be explicitly configured! it does not just show up on its own. go look at snmpa_error and the configuration parameters for that 🌸

πŸ”₯ FUNCTIONS πŸ”₯

πŸ’œ config_err(Format, Args) -> snmp:void()

config_err(Format, Args) -> snmp:void()
    when Format :: string(), Args :: list().

this one gets called if an error pops off during the configuration phase β€” like, for example, if a syntax error is found in a configuration file. not me catching your typos before you even start 😭

Format and Args are exactly as in io:format(Format, Args), no cap. periodt πŸ’…

🌈 user_err(Format, Args) -> snmp:void()

user_err(Format, Args) -> snmp:void()
    when Format :: string(), Args :: list().

and this one gets called if a user related error happens at run-time β€” for example, if a user defined instrumentation function returns erroneous. yeah. the instrumentation function. that one πŸ™ˆ

same deal: Format and Args are as in io:format(Format, Args). exactly the same, no plot twist 🌟


✨ reminder for the girlies: both callbacks just hand Format and Args straight to io:format(Format, Args), and both return snmp:void(). don't overthink it, bestie 🧚

and that's the whole page!! courtesy of Ericsson AB, this is the snmp 5.20.5 era, and the page is snmpa_error_io(3) β€” brought to you on the date stamped in that footer, mwah πŸ’– bye bestie, go configure your module πŸŽ€

πŸ“¦ where this page comes from