Comparison

init.lua @ 126:fa3ddadb8364

verse: verse.loop() and new verse.step() use the new error handler to, er, handle errors.
author Matthew Wild <mwild1@gmail.com>
date Mon, 13 Sep 2010 14:08:41 +0100
parent 125:b46921de1e03
child 132:b38397163737
comparison
equal deleted inserted replaced
125:b46921de1e03 126:fa3ddadb8364
43 function verse.set_error_handler(new_error_handler) 43 function verse.set_error_handler(new_error_handler)
44 error_handler = new_error_handler; 44 error_handler = new_error_handler;
45 end 45 end
46 46
47 function verse.loop() 47 function verse.loop()
48 return server.loop(); 48 return xpcall(server.loop, error_handler);
49 end
50
51 function verse.step()
52 return xpcall(server.step, error_handler);
49 end 53 end
50 54
51 function verse.quit() 55 function verse.quit()
52 return server.setquitting(true); 56 return server.setquitting(true);
53 end 57 end