001/** 002 * Unit-API - Units of Measurement API for Java 003 * Copyright (c) 2014 Jean-Marie Dautelle, Werner Keil, V2COM 004 * All rights reserved. 005 * 006 * See LICENSE.txt for details. 007 */ 008package javax.measure; 009 010/** 011 * Exception thrown when errors occur during measurement operations. 012 * 013 * @author <a href="mailto:[email protected]">Werner Keil</a> 014 * @version 0.5, $Date: 2014-06-28 $ 015 * 016 */ 017public class MeasurementException extends RuntimeException { 018 019 /** 020 * For cross-version compatibility. 021 */ 022 private static final long serialVersionUID = 8959937033300443361L; 023 024 /** 025 * Constructs a {@code MeasurementException} with the given message. 026 * 027 * @param message the detail message, or {@code null} if none. 028 */ 029 public MeasurementException(final String message) { 030 super(message); 031 } 032 033 /** 034 * Constructs a {@code MeasurementException} with the given cause. 035 * 036 * @param cause the cause of this exception, or {@code null} if none. 037 */ 038 public MeasurementException(final Throwable cause) { 039 super(cause); 040 } 041 042 /** 043 * Constructs a {@code MeasurementException} with the given message and cause. 044 * 045 * @param message the detail message, or {@code null} if none. 046 * @param cause the cause of this exception, or {@code null} if none. 047 * 048 */ 049 public MeasurementException(final String message, final Throwable cause) { 050 super(message, cause); 051 } 052 053 /** 054 * Constructs a {@code MeasurementException} with no given message. 055 * 056 */ 057 protected MeasurementException() { 058 super(); 059 } 060}