001/* 002 * SPDX-FileCopyrightText: none 003 * SPDX-License-Identifier: CC0-1.0 004 */ 005 006package dev.metaschema.core.metapath; 007 008import edu.umd.cs.findbugs.annotations.Nullable; 009 010/** 011 * <a href= "https://www.w3.org/TR/xpath-31/#ERRXPDY0002">err:MPDY0002</a>: It 012 * is a <a href="https://www.w3.org/TR/xpath-31/#dt-dynamic-error">dynamic 013 * error</a> if evaluation of an expression relies on some part of the 014 * <a href="https://www.w3.org/TR/xpath-31/#dt-dynamic-context">dynamic 015 * context</a> that is 016 * <a href="https://www.w3.org/TR/xpath-datamodel-31/#dt-absent">absent</a>. 017 */ 018public class ContextAbsentDynamicMetapathException 019 extends DynamicMetapathException { 020 021 private static final long serialVersionUID = 1L; 022 023 /** 024 * Constructs a new exception with the provided {@code message} and no cause. 025 * 026 * @param message 027 * the exception message 028 */ 029 public ContextAbsentDynamicMetapathException(@Nullable String message) { 030 super(DYNAMIC_CONTEXT_ABSENT, message); 031 } 032 033 /** 034 * Constructs a new exception with the provided {@code message} and 035 * {@code cause}. 036 * 037 * @param message 038 * the exception message 039 * @param cause 040 * the original exception cause 041 */ 042 public ContextAbsentDynamicMetapathException( 043 @Nullable String message, 044 @Nullable Throwable cause) { 045 super(DYNAMIC_CONTEXT_ABSENT, message, cause); 046 } 047 048 /** 049 * Constructs a new exception with the provided {@code cause} and no message. 050 * 051 * @param cause 052 * the original exception cause 053 */ 054 public ContextAbsentDynamicMetapathException(@Nullable Throwable cause) { 055 super(DYNAMIC_CONTEXT_ABSENT, cause); 056 } 057}