src/Pure/library.ML
changeset 3365 86c0d1988622
parent 3246 7f783705c7a4
child 3393 e31ac367387e
equal deleted inserted replaced
3364:8f225296fade 3365:86c0d1988622
   745 
   745 
   746 val error_fn = ref(fn s => TextIO.output 
   746 val error_fn = ref(fn s => TextIO.output 
   747 		            (TextIO.stdOut, "\n*** " ^ s ^ "\n\n"));
   747 		            (TextIO.stdOut, "\n*** " ^ s ^ "\n\n"));
   748 
   748 
   749 exception ERROR;
   749 exception ERROR;
   750 fun error msg = (!error_fn msg; raise ERROR);
   750 fun error msg = (!error_fn msg;
       
   751 		 TextIO.flushOut TextIO.stdOut; 
       
   752 		 raise ERROR);
   751 fun sys_error msg = (!error_fn "*** SYSTEM ERROR ***"; error msg);
   753 fun sys_error msg = (!error_fn "*** SYSTEM ERROR ***"; error msg);
   752 
   754 
   753 fun assert p msg = if p then () else error msg;
   755 fun assert p msg = if p then () else error msg;
   754 fun deny p msg = if p then error msg else ();
   756 fun deny p msg = if p then error msg else ();
   755 
   757