Package org.djutils.exceptions


package org.djutils.exceptions
Utilities such as Throw and Try to help with exceptions. Throw.when(...) and Try.assign(...) and Try.execute(...) can reduce many lines of code with try...catch statements to single lines of code.

Copyright (c) 2016-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.

  • Class
    Description
    The Throw class has a number of static methods that make it easy to throw an exception under conditions for any Exception class, including the standard Java exceptions and exceptions from libraries that are used in the project.
    The Try class has a number of static methods that make it easy to try-catch an exception for any Throwable class, including the standard Java exceptions and exceptions from libraries that are used in the project.
    Functional interface for calls to Try.assign(...).
    Functional interface for calls to Try.execute(...).