001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.marshall.parser; 018 019/** 020 * Unchecked wrapper used by the 021 * {@link org.apache.juneau.marshall.stream.RecordReader#iterator(Class) iterator(...)} / 022 * {@link org.apache.juneau.marshall.stream.RecordReader#stream(Class) stream(...)} views to surface the checked 023 * {@link java.io.IOException} / {@link ParseException} cause 024 * through the {@link java.util.Iterator} / {@link java.util.stream.Stream} API. 025 * 026 * <p> 027 * Carries the original typed cause so pipeline consumers can recover it via 028 * {@link #getCause()} and react meaningfully, rather than catching a bare 029 * {@link RuntimeException}. 030 */ 031public class RuntimeParseException extends RuntimeException { 032 033 private static final long serialVersionUID = 1L; 034 035 /** 036 * Constructor. 037 * 038 * @param cause The underlying checked exception (typically {@link java.io.IOException} or 039 * {@link ParseException}). 040 * <br>Can be <jk>null</jk> (the exception is created with no cause and no message). 041 */ 042 public RuntimeParseException(Throwable cause) { 043 super(cause); 044 } 045}