1. Added error handling logic and check for valid stimulus intensities
   in macro editor.