
#ifndef PLS_ERROR_HANDLING_H
#define PLS_ERROR_HANDLING_H

#include <iostream>

/**
 * Called when there is an non-recoverable error/invariant in the scheduler.
 * This SHOULD NOT HAPPEN AT ANY POINT in production, any instance of this is a bug!
 * The implementation can be changed if for example no iostream is available on a system
 * (or its inclusion adds too much overhead).
 */
#define PLS_ERROR(msg) std::cout << msg << std::endl; exit(1);
#define PLS_ASSERT(cond, msg) if (!cond) { PLS_ERROR(msg) }

#endif //PLS_ERROR_HANDLING_H
