/*
* Copyright 2008-2009 Katholieke Universiteit Leuven
*
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
*
* Written by Sven Verdoolaege, K.U.Leuven, Departement
* Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
#include <isl_ctx_private.h>
#include <isl/vec.h>
-#include <isl/options.h>
+#include <isl_options_private.h>
-void isl_handle_error(isl_ctx *ctx, int error, const char *msg,
+void isl_handle_error(isl_ctx *ctx, enum isl_error error, const char *msg,
const char *file, int line)
{
+ if (!ctx)
+ return;
+
isl_ctx_set_error(ctx, error);
- switch (isl_options_get_on_error(ctx)) {
+ switch (ctx->opt->on_error) {
case ISL_ON_ERROR_WARN:
fprintf(stderr, "%s:%d: %s\n", file, line, msg);
return;