Re: Euphoria MVC updates

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu