001/*
002 * JGrapes Event Driven Framework
003 * Copyright (C) 2016-2018 Michael N. Lipp
004 * 
005 * This program is free software; you can redistribute it and/or modify it 
006 * under the terms of the GNU Affero General Public License as published by 
007 * the Free Software Foundation; either version 3 of the License, or 
008 * (at your option) any later version.
009 * 
010 * This program is distributed in the hope that it will be useful, but 
011 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
012 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License 
013 * for more details.
014 * 
015 * You should have received a copy of the GNU Affero General Public License along 
016 * with this program; if not, see <http://www.gnu.org/licenses/>.
017 */
018
019package org.jgrapes.io.events;
020
021import org.jgrapes.core.Event;
022import org.jgrapes.core.events.Error;
023
024/**
025 * A special kind of {@link Error} that signals I/O related problems.
026 * 
027 * @see Closed
028 */
029public class IOError extends Error {
030
031    /**
032     * Creates a new event as a copy of an existing event. Useful
033     * for forwarding an event.
034     *
035     * @param event the event to copy
036     */
037    public IOError(IOError event) {
038        super(event);
039    }
040
041    /**
042     * Creates a new instance.
043     * 
044     * @param event the event that was being handled when the problem occurred
045     * @param message the message
046     */
047    public IOError(Event<?> event, String message) {
048        super(event, message);
049    }
050
051    /**
052     * Creates a new instance.
053     * 
054     * @param event the event that was being handled when the problem occurred
055     * @param message the message
056     * @param throwable the encountered throwable
057     */
058    public IOError(Event<?> event, String message, Throwable throwable) {
059        super(event, message, throwable);
060    }
061
062    /**
063     * Creates a new instance.
064     * 
065     * @param event the event that was being handled when the problem occurred
066     * @param throwable the encountered throwable
067     */
068    public IOError(Event<?> event, Throwable throwable) {
069        super(event, throwable);
070    }
071
072}