startmacro

  set fileName "bad_file_name"
  label re_enter
   if filename EQS "bad_file_name" then
     error "The file name ^filename is a BAD file name"
   endif
  assert/text="^reg.main.name: processException procedure" &
      fileName EQS "good_file_name"
  stop

  label try_again
    set newfileName "good_file_name"
    ! Prompting the user is an example of how you might do this in the real
    ! world but for purposes of testing we automatically change the name
    !!!ask s:filename "^filename is not a good filename.  &
    !!!   Enter new filename[^newfileName]: "
    set fileName "^newfileName"
  goto re_enter

endmacro

procedure processException
  ! Caught exception, continue processing
  goto try_again
  
return
