mirror of https://github.com/arendst/Tasmota.git
Display exception in autoexec.bet
This commit is contained in:
parent
c2cde43a54
commit
d4b2a85aff
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
* Handlers for Berry calls and async
|
* Handlers for Berry calls and async
|
||||||
*
|
*
|
||||||
\*********************************************************************************************/
|
\*********************************************************************************************/
|
||||||
|
|
||||||
const char berry_prog[] =
|
const char berry_prog[] =
|
||||||
|
@ -106,7 +106,7 @@ const char berry_prog[] =
|
||||||
// "self._rules.remove(pat) "
|
// "self._rules.remove(pat) "
|
||||||
// "end "
|
// "end "
|
||||||
// "end "
|
// "end "
|
||||||
|
|
||||||
// // Rules trigger if match. return true if match, false if not
|
// // Rules trigger if match. return true if match, false if not
|
||||||
// "def try_rule(event, rule, f) "
|
// "def try_rule(event, rule, f) "
|
||||||
// "import string "
|
// "import string "
|
||||||
|
@ -161,7 +161,7 @@ const char berry_prog[] =
|
||||||
// "end "
|
// "end "
|
||||||
// "return false "
|
// "return false "
|
||||||
// "end "
|
// "end "
|
||||||
|
|
||||||
// "def set_timer(delay,f) "
|
// "def set_timer(delay,f) "
|
||||||
// "if !self._timers self._timers=[] end "
|
// "if !self._timers self._timers=[] end "
|
||||||
// "self._timers.push([self.millis(delay),f]) "
|
// "self._timers.push([self.millis(delay),f]) "
|
||||||
|
@ -258,7 +258,7 @@ const char berry_prog[] =
|
||||||
// "c() "
|
// "c() "
|
||||||
// "self.log(string.format(\"BRY: sucessfully loaded '%s'\",f)) "
|
// "self.log(string.format(\"BRY: sucessfully loaded '%s'\",f)) "
|
||||||
// "except .. as e "
|
// "except .. as e "
|
||||||
// "raise \"io_error\",string.format(\"Could not load file '%s'\",f) "
|
// "raise \"io_error\",string.format(\"Could not load file '%s'\",f) "
|
||||||
// "end "
|
// "end "
|
||||||
|
|
||||||
// "end "
|
// "end "
|
||||||
|
@ -395,8 +395,8 @@ const char berry_autoexec[] =
|
||||||
// load "autoexec.be" using import, which loads either .be or .bec file
|
// load "autoexec.be" using import, which loads either .be or .bec file
|
||||||
"try "
|
"try "
|
||||||
"load('autoexec.be') "
|
"load('autoexec.be') "
|
||||||
"except .. "
|
"except .. as e,m "
|
||||||
"log(\"BRY: No 'autoexec.be' file\") "
|
"log(\"BRY: exception in autoexec '\",e,\"':\",m) "
|
||||||
"end "
|
"end "
|
||||||
;
|
;
|
||||||
#endif // USE_BERRY
|
#endif // USE_BERRY
|
||||||
|
|
Loading…
Reference in New Issue