summaryrefslogtreecommitdiff
path: root/bs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'bs.lua')
-rw-r--r--bs.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/bs.lua b/bs.lua
new file mode 100644
index 0000000..bb284cc
--- /dev/null
+++ b/bs.lua
@@ -0,0 +1,9 @@
+local M = {}
+-- handles errors sensibly
+function M.loop_correctly(context, cq)
+ local ok, err, code, thread, pollee, fd = cq:loop()
+ error('👉'..context..' '..debug.traceback(thread,err)..'👈',0)
+end
+
+return M
+