001/*
002 * Copyright (c) 2012-2021 Institut National des Sciences Appliquées de Lyon (INSA Lyon) and others
003 *
004 * This program and the accompanying materials are made available under the
005 * terms of the Eclipse Public License 2.0 which is available at
006 * http://www.eclipse.org/legal/epl-2.0.
007 *
008 * SPDX-License-Identifier: EPL-2.0
009 */
010
011package org.eclipse.golo.compiler;
012
013/**
014 * Exception to stop the compilation process.
015 *
016 * <p>No stacktrace is available to make it lightweight.
017 * Usefull in macros to stop the compilation without all the usual error stuffs.
018 */
019public class StopCompilationException extends RuntimeException {
020  public StopCompilationException() {
021    this(null, null);
022  }
023
024  public StopCompilationException(String message) {
025    this(message, null);
026  }
027
028  public StopCompilationException(Throwable cause) {
029    this(null, cause);
030  }
031
032  public StopCompilationException(String message, Throwable cause) {
033    super(message, cause, true, false);
034  }
035
036  @Override
037  public Throwable fillInStackTrace() {
038    return this;
039  }
040}