Commit 701c4dad authored by simonmar's avatar simonmar
Browse files

[project @ 2000-04-26 10:17:41 by simonmar]

Give a more informative error message in rts_checkSchedStatus().
parent c068eefd
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* $Id: RtsAPI.c,v 1.16 2000/04/25 14:57:39 simonmar Exp $ * $Id: RtsAPI.c,v 1.17 2000/04/26 10:17:41 simonmar Exp $
* *
* (c) The GHC Team, 1998-2000 * (c) The GHC Team, 1998-2000
* *
...@@ -384,11 +384,19 @@ rts_evalNothing(unsigned int stack_size) ...@@ -384,11 +384,19 @@ rts_evalNothing(unsigned int stack_size)
/* Convenience function for decoding the returned status. */ /* Convenience function for decoding the returned status. */
void rts_checkSchedStatus ( char* site, SchedulerStatus rc ) void
{ rts_checkSchedStatus ( char* site, SchedulerStatus rc )
if ( rc == Success ) { {
return; switch (rc) {
} else { case Success:
barf("%s: Return code (%d) not ok",(site),(rc)); return;
} case Killed:
barf("%s: uncaught exception",site);
case Interrupted:
barf("%s: interrupted", site);
case Deadlock:
barf("%s: no threads to run: infinite loop or deadlock?", site);
default:
barf("%s: Return code (%d) not ok",(site),(rc));
}
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment