! Test for handling of exceptions within the macro (Bug 1897)
!
! @author  J. Bauer
! @version $Id: test_process_exception.mm,v 1.1 2010/10/07 17:12:28 jwb Exp $
!
startmacro

  set x 75
  
  call loopException
  
endmacro

procedure loopException

  set y 1.0
  new nxm.sys.lib.ImageFile iFile
  
  while y lt x
    invoke iFile.readImage()
    calculator y 1 y +
  endwhile
  

return

!**************************************************************************************************!
!
!   Trap exceptions 
!
procedure processException m:emsg
  say "------->>>>>>> GOT EXCEPTION: ^emsg DATA=^emsg.data"
  
return