001package Torello.Browser; 002 003import Torello.Browser.CDPTypes; 004import Torello.Browser.WriteJSON; 005import Torello.Java.UnreachableError; 006 007/** 008 * Indicates that a class has received a Java {@code 'byte'} which isn't among the recognized 009 * <B STYLE='color:red;'>"Computed Type as Byte"</B> constant values, as listed within 010 * static-constant class {@link CDPTypes}. 011 * 012 * <BR /><BR /> 013 * Generally, any class which utilizes the static constants defined in class {@link CDPTypes} is 014 * likely intended for internal & proprietary use only. Such a class probably shouldn't be 015 * invoked by external, user code. Such classes (for instance, class {@link WriteJSON} remain 016 * public because, indeed, classes which reside in packages other than {@code 'Torello.Browser'} 017 * invoke {@code WriteJSON}. 018 * 019 * <BR /><BR /> 020 * As a result, it must be declared public. And because JavaDoc publishes anything which has the 021 * reserved keyword 'public', you the end user can see the methods & fields. 022 * 023 * <BR /><BR /><DIV CLASS=JDHint> 024 * ⚠️ What this really means is that the 'unsightly' and generic {@link UnreachableError} is 025 * replaced by a specially tailored error class (this one). On the off chance that a programmer 026 * were to invoke {@code 'WriteJSON'}, the generic assert-fail {@code Throwable}, 027 * {@link UnreachableError} is quite inappropriate 028 * 029 * <BR /><BR /> 030 * 💡 You may view the complete list of valid {@code 'byte'} constants, as they are defined in class 031 * {@link CDPTypes} 032 * </DIV> 033 * 034 * @see WriteJSON 035 * @see CDPTypes 036 */ 037public class UnrecognizedCTABError extends Error 038{ 039 /** <EMBED CLASS='external-html' DATA-FILE-ID=SVUIDEX> */ 040 protected static final long serialVersionUID = 1L; 041 042 /** Constructs a {@code UnrecognizedCTABError} with no detail message. */ 043 public UnrecognizedCTABError() 044 { super(); } 045 046 /** 047 * Constructs a {@code UnrecognizedCTABError} using the erroneous {@code 'CTAB'} value as the 048 * detail message. 049 * 050 * @param CTAB The erroneous value used for <B SYTLE='color:red;'>"Computed Type as Byte"</B> 051 * (CTAB) 052 * 053 * @see WriteJSON#get(get(JsonGenerator, byte, String, Object, boolean) 054 */ 055 public UnrecognizedCTABError(byte CTAB) 056 { super("The following byte was used for a 'CTAB' (Computed Type as Byte) value: " + CTAB); } 057}