All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.checkerframework.javacutil.TypeSystemError Maven / Gradle / Ivy

Go to download

The Checker Framework enhances Java's type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

There is a newer version: 3.44.0
Show newest version
package org.checkerframework.javacutil;

import org.checkerframework.checker.formatter.qual.FormatMethod;
import org.checkerframework.checker.nullness.qual.Nullable;

/**
 * Exception type indicating a mistake by a type system built using the Checker Framework. For
 * example, misusing a meta-annotation on a qualifier.
 *
 * 

To indicate a bug in the framework, use {@link BugInCF}. To indicate that an end user made a * mistake, use {@link UserError}. */ @SuppressWarnings("serial") public class TypeSystemError extends RuntimeException { /** * Constructs a new TypeSystemError with the specified detail message. * * @param message the detail message */ public TypeSystemError(String message) { super(message); if (message == null) { throw new BugInCF("Must have a detail message."); } } /** * Constructs a new TypeSystemError with a detail message composed from the given arguments. * * @param fmt the format string * @param args the arguments for the format string */ @FormatMethod public TypeSystemError(String fmt, @Nullable Object... args) { this(String.format(fmt, args)); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy