diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-03-13 12:12:19 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-03-13 12:12:19 -0700 |
commit | 1017e80fe5ffce67976822cf5b275216b776e65b (patch) | |
tree | f7d0802fb0811c3878770623df8feb5c52da9038 | |
parent | 6ece3bb664ab508d784b91e9c20ecfa4da2677d0 (diff) | |
download | teliva-1017e80fe5ffce67976822cf5b275216b776e65b.tar.gz |
less confusing error when apps get past main
-rw-r--r-- | src/task.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/task.lua b/src/task.lua index 54d6bb1..ebb1567 100644 --- a/src/task.lua +++ b/src/task.lua @@ -388,15 +388,17 @@ _M.NOP = NOP function spawn_main() task.spawn(call_main) task.scheduler() - assert(false, "Teliva's scheduler ran out of work; this shouldn't happen.\n".. - "Either a channel is blocked forever or you're reading past\n".. - "the end of a file (after recv() returned nil).\n") + assert(false, "Teliva ran out of stuff to do. Possible causes:\n".. + "- main() returned. Apps shouldn't let this happen.\n".. + "- App is reading past the end of a file (after recv() returned nil)\n".. + "- Some channel is blocked forever.\n".. curses.nodelay(true) curses.getch() end -- This function exists only to make the call to 'main' visible to Teliva. --- Teliva can't yet recognize the caller of indirect calls. +-- Teliva can't yet recognize the caller of indirect calls, as happens with +-- task.spawn. function call_main() main() end |