this repo has no description
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
3/*
4 * Main authors:
5 * Guido Tack <guido.tack@monash.edu>
6 */
7
8/* This Source Code Form is subject to the terms of the Mozilla Public
9 * License, v. 2.0. If a copy of the MPL was not distributed with this
10 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
11
12#include <minizinc/astexception.hh>
13#include <minizinc/flatten_internal.hh>
14
15namespace MiniZinc {
16
17LocationException::LocationException(EnvI& env, const Location& loc, const std::string& msg)
18 : Exception(msg), _loc(loc) {
19 env.createErrorStack();
20}
21
22ResultUndefinedError::ResultUndefinedError(EnvI& env, const Location& loc, const std::string& msg)
23 : LocationException(env, loc, msg) {
24 if (env.in_maybe_partial == 0)
25 env.addWarning("undefined result becomes false in Boolean context\n (" + msg + ")");
26}
27
28} // namespace MiniZinc