Class BusinessException

java.lang.Object
java.lang.Throwable
java.lang.Exception
de.enterprise.spring.boot.common.exception.BusinessException
All Implemented Interfaces:
java.io.Serializable

public class BusinessException
extends java.lang.Exception
The business exception indicates that the arguments provided to a service did not fulfill its requirements. This also includes security violations and a non-existing entity for a primary key. This does not include technical problems.
Author:
Malte Geßner
See Also:
Serialized Form
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static long serialVersionUID
    serial uid.
  • Constructor Summary

    Constructors 
    Constructor Description
    BusinessException​(java.lang.String code, java.lang.String description)
    business logic failed.
    BusinessException​(java.lang.String code, java.lang.String description, java.lang.Throwable t)
    business logic failed.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getCode()  
    java.lang.String getDescription()  

    Methods inherited from class java.lang.Throwable

    addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • BusinessException

      public BusinessException​(java.lang.String code, java.lang.String description)
      business logic failed.
      Parameters:
      code - hint for ui
      description - hint for developer
    • BusinessException

      public BusinessException​(java.lang.String code, java.lang.String description, java.lang.Throwable t)
      business logic failed.
      Parameters:
      code - hint for ui
      description - hint for developer
      t - cause
  • Method Details