You can control how a macro responds when an error occurs during execution. By creating and adding an onError macro to your macro file, you can specify that, on the occurrence of an error, macro execution within the current macro stops and the onError macro is invoked. An onError macro can call other macros. If another error occurs after the onError macro is invoked, macro execution stops again and the onError macro is invoked again. This process continues either until the onError macro completes or until reaching the recursion limit of 10.