Re: Euphoria MVC updates
- Posted by jmduro Nov 16, 2021
- 2821 views
I didn't explain well what I expect. I have intentionally provoked the crash by selecting a non-existing table in the SQLite database.
I'm using OpenEuphoria because of its debugging features. I need to get traces even when a DLL results in a crash. I expect getting an error message by avoiding an external crash caused by a DLL. Instead I want Euphoria to get a return code when possible and then to provoke a crash after logging a message. That is why I tested this "bizarre" method using multitasking. This is how:
integer return_code procedure task_update() sequence cmd = sprintf("UPDATE \"devices\" SET \"%s\" = \"%s\" WHERE \"rowid\" = %d;", {"Last_update", deviceList[selected][LAST_UPDATE], selected}) return_code = sqlite_get_table(sql_db, cmd) end procedure atom t1= task_create(routine_id("task_update", {}) task_schedule(t1, 1) if return_code != SQLITE_OK then error:crash("Update failed!") end if
Jean-Marc