void chpl_error_preformatted(const char* message) { spinhaltIfAlreadyExiting(); fflush(stdout); fprintf(stderr, "%s\n", message); #ifdef CHPL_UNWIND_NOT_LAUNCHER chpl_stack_unwind(); #endif chpl_exit_any(1); }
void chpl_error_explicit(const char *message, int32_t lineno, const char *filename) { spinhaltIfAlreadyExiting(); fflush(stdout); if (lineno > 0) fprintf(stderr, "%s:%" PRId32 ": error: %s", filename, lineno, message); else if (filename) fprintf(stderr, "%s: error: %s", filename, message); else fprintf(stderr, "error: %s", message); fprintf(stderr, "\n"); #ifdef CHPL_UNWIND_NOT_LAUNCHER chpl_stack_unwind(); #endif chpl_exit_any(1); }