@@ -0,0 +1,3084 @@
+package org.svetovid.io;%0D%0A%0D%0Aimport java.text.MessageFormat;%0D%0Aimport java.util.Locale;%0D%0Aimport java.util.ResourceBundle;%0D%0A%0D%0Aimport org.svetovid.Svetovid;%0D%0A%0D%0A/**%0D%0A * %7B@code SvetovidException%7D is the superclass of those exceptions that can be%0D%0A * thrown during the operation of this library. %7B@code SvetovidException%7D and%0D%0A * its subclasses are %3Cem%3Eunchecked%0D%0A * exceptions%3C/em%3E.%0D%0A *%0D%0A * @author Ivan Pribela%0D%0A */%0D%0Apublic class SvetovidException extends RuntimeException %7B%0D%0A%0D%0A    private static final long serialVersionUID = 6174499953383903816L;%0D%0A%0D%0A    private String messageKey;%0D%0A    private Object%5B%5D messageArguments;%0D%0A%0D%0A    /**%0D%0A     * Constructs a %7B@code SvetovidException%7D with the specified message.%0D%0A     *%0D%0A     * @param messageKey%0D%0A     *            The resource bundle key of the detail message, which is saved%0D%0A     *            for later retrieval by the %7B@link #getMessage()%7D method%0D%0A     * @param messageArguments%0D%0A     *            Optional arguments for formatting of the detail message%0D%0A     */%0D%0A    public SvetovidException(String messageKey, Object... messageArguments) %7B%0D%0A        super(messageKey);%0D%0A        this.messageKey = messageKey;%0D%0A        this.messageArguments = messageArguments;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Constructs a %7B@code SvetovidException%7D with the specified detail message%0D%0A     * and cause.%0D%0A     *%0D%0A     * %3Cp%3E%0D%0A     * Note that the detail message associated with %7B@code cause%7D is %3Ci%3Enot%3C/i%3E%0D%0A     * automatically incorporated into this exception's detail message.%0D%0A     *%0D%0A     * @param messageKey%0D%0A     *            The resource bundle key of the detail message, which is saved%0D%0A     *            for later retrieval by the %7B@link #getMessage()%7D method%0D%0A     * @param cause%0D%0A     *            The cause, which is saved for later retrieval by the%0D%0A     *            %7B@link #getCause()%7D method. A null value is permitted, and%0D%0A     *            indicates that the cause is nonexistent or unknown.%0D%0A     * @param messageArguments%0D%0A     *            Optional arguments for formatting of the detail message%0D%0A     */%0D%0A    public SvetovidException(String messageKey, Throwable cause, Object... messageArguments) %7B%0D%0A        super(messageKey, cause);%0D%0A        this.messageKey = messageKey;%0D%0A        this.messageArguments = messageArguments;%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Returns the detail message string of this exception.%0D%0A     *%0D%0A     * @return the formatted detail message of this exception instance.%0D%0A     */%0D%0A    @Override%0D%0A    public String getMessage() %7B%0D%0A        return getMessage(Svetovid.LOCALE);%0D%0A    %7D%0D%0A%0D%0A    /**%0D%0A     * Creates a localized description of this exception.%0D%0A     *%0D%0A     * @param locale%0D%0A     *            the %7B@code Locale%7D in which to return the message%0D%0A     *%0D%0A     * @return The localized description of this exception.%0D%0A     */%0D%0A    public String getMessage(Locale locale) %7B%0D%0A        ResourceBundle bundle = ResourceBundle.getBundle(%22i18n/exception%22, locale);%0D%0A        String pattern = bundle.getString(getClass().getSimpleName() + %22.%22 + messageKey);%0D%0A        return MessageFormat.format(pattern, messageArguments);%0D%0A    %7D%0D%0A%7D%0D%0A

Add SvetovidException as a base class for iolib exceptions