I would like to implement try/catch extension to yaws:yaws_*rpc modules
handler and handler_session functions.
At current moment I can see in our production code, that
nearly each handler is wrapped in try/catch construct -- which allows us
generate correct error message (like "internal software error", "generic
validation failed" and etc), if message is thrown from deeply nested
code or if some matching fails.
So I would like to add
handler(Args, Handler, CatchFun)
handler_session(Args, Handler, SID_Name, CatchFun)
CatchFun/2 and CatchFun/5 is a fun which is called only when handler
throws some error.
CatchFun(Args, Handler, InData, ErrorType, ErrorMsg) should be used if
one wants full reporting on which arguments fired the error.
CatchFun(ErrorType, ErrorMsg) is a simplified version of previous
function, which just takes care of handling exception.
Your comments and suggestions are welcome.
Network security consulting
t +37493 419763 (mob)
Get latest updates about Open Source Projects, Conferences and News.