Closed poga closed 6 years ago
With https://github.com/poga/actix-lua/commit/95b92769f873caff144c73d3eb927e00862f7e0a, all unwrap
in LuaActorBuilder
are removed.
https://github.com/poga/actix-lua/commit/9f206ff6a3908946f646f228b23d268dea7dcc22 removed most of the unwrap
in actor.rs
.
There're 2 places still use unwrap
. The first is converting parameter of invoke
to Lua value. Since parameters are LuaMessage
, it should be fine.
The second place is unwrapping do_send
. AFAIK if do_send
failed, then there's a bigger issue in the system. Panicking when it failed might be acceptable.
Let's close this for now.
Currently, there are
unwrap
everywhere. Some of them are needed. Some of them should be refactored into properResult
. We should have a cleaner big pictures about errors propagation.Also need to document about how to deal with lua errors such as syntax error,
error()
...etc.