surround octave with try/catch