2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 * $Id: WrappedRuntimeException.java 468654 2006-10-28 07:09:23Z minchau $
21 package org.apache.xml.serializer.utils;
24 * This class is for throwing important checked exceptions
25 * over non-checked methods. It should be used with care,
26 * and in limited circumstances.
28 * This class is a copy of the one in org.apache.xml.utils.
29 * It exists to cut the serializers dependancy on that package.
31 * This class is not a public API, it is only public because it is
32 * used by org.apache.xml.serializer.
35 public final class WrappedRuntimeException extends RuntimeException
37 static final long serialVersionUID = 7140414456714658073L;
39 /** Primary checked exception.
41 private Exception m_exception;
44 * Construct a WrappedRuntimeException from a
47 * @param e Primary checked exception
49 public WrappedRuntimeException(Exception e)
52 super(e.getMessage());
58 * Constructor WrappedRuntimeException
61 * @param msg Exception information.
62 * @param e Primary checked exception
64 public WrappedRuntimeException(String msg, Exception e)
73 * Get the checked exception that this runtime exception wraps.
75 * @return The primary checked exception
77 public Exception getException()