001package org.jsoup; 002 003/** 004 * A SerializationException is raised whenever serialization of a DOM element fails. This exception usually wraps an 005 * {@link java.io.IOException} that may be thrown due to an inaccessible output stream. 006 */ 007public final class SerializationException extends RuntimeException { 008 /** 009 * Creates and initializes a new serialization exception with no error message and cause. 010 */ 011 public SerializationException() { 012 super(); 013 } 014 015 /** 016 * Creates and initializes a new serialization exception with the given error message and no cause. 017 * 018 * @param message 019 * the error message of the new serialization exception (may be <code>null</code>). 020 */ 021 public SerializationException(String message) { 022 super(message); 023 } 024 025 /** 026 * Creates and initializes a new serialization exception with the specified cause and an error message of 027 * <code>(cause==null ? null : cause.toString())</code> (which typically contains the class and error message of 028 * <code>cause</code>). 029 * 030 * @param cause 031 * the cause of the new serialization exception (may be <code>null</code>). 032 */ 033 public SerializationException(Throwable cause) { 034 super(cause); 035 } 036 037 /** 038 * Creates and initializes a new serialization exception with the given error message and cause. 039 * 040 * @param message 041 * the error message of the new serialization exception. 042 * @param cause 043 * the cause of the new serialization exception. 044 */ 045 public SerializationException(String message, Throwable cause) { 046 super(message, cause); 047 } 048}