Sign In Register

How can we help you today?

Start a new topic
Answered

Throw Non-Fatal Exception

when i throw an exception, e.g.

throw "TimeOut";

it's always logged as "FATAL" in the script.log collection. is there a way to throw the error such that it's logged as warning or debug? thanks!


Best Answer

Hi Ham,


You can use the following to send a debug or warning level message to script.log from your scripts.


 

//debug level
Spark.log.debug("Debug");

//warning level
Spark.log.warn("This is a warning");




Thanks,

Liam


Answer

Hi Ham,


You can use the following to send a debug or warning level message to script.log from your scripts.


 

//debug level
Spark.log.debug("Debug");

//warning level
Spark.log.warn("This is a warning");




Thanks,

Liam

thanks. so i guess if i want to throw something and log it as a warning, i should do a catch and log it with Spark.log.warn(). that will work. thanks!

Login to post a comment