actionError

actionError ( closure action ) : void

Run an action if there is an error in the script. You can use MegaImporter.log and MegaImporter.error in this function. You must set exactly 1 argument to your closure, it will be the code of the error.

Example


actionClose({->
write(path("desktop")+"time_end.txt",timestamp())
})

Parameters

action

Action to run when you have an error