// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : Enums.cs // Author(s) : Natalia Portillo // // Component : Disc image plugins. // // --[ Description ] ---------------------------------------------------------- // // Defines exceptions to be thrown by disc image plugins. // // --[ License ] -------------------------------------------------------------- // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 2.1 of the // License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, but // WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, see . // // ---------------------------------------------------------------------------- // Copyright © 2011-2018 Natalia Portillo // ****************************************************************************/ using System; using System.Runtime.Serialization; namespace DiscImageChef.CommonTypes.Exceptions { /// /// Feature is supported by image but not implemented yet. /// [Serializable] public class FeatureSupportedButNotImplementedImageException : Exception { /// /// Feature is supported by image but not implemented yet. /// /// Message. /// Inner. public FeatureSupportedButNotImplementedImageException(string message, Exception inner) : base(message, inner) { } /// /// Feature is supported by image but not implemented yet. /// /// Message. public FeatureSupportedButNotImplementedImageException(string message) : base(message) { } /// /// Feature is supported by image but not implemented yet. /// /// Info. /// Context. protected FeatureSupportedButNotImplementedImageException(SerializationInfo info, StreamingContext context) { if(info == null) throw new ArgumentNullException(nameof(info)); } } /// /// Feature is not supported by image. /// [Serializable] public class FeatureUnsupportedImageException : Exception { /// /// Feature is not supported by image. /// /// Message. /// Inner. public FeatureUnsupportedImageException(string message, Exception inner) : base(message, inner) { } /// /// Feature is not supported by image. /// /// Message. public FeatureUnsupportedImageException(string message) : base(message) { } /// /// Feature is not supported by image. /// /// Info. /// Context. protected FeatureUnsupportedImageException(SerializationInfo info, StreamingContext context) { if(info == null) throw new ArgumentNullException(nameof(info)); } } /// /// Feature is supported by image but not present on it. /// [Serializable] public class FeatureNotPresentImageException : Exception { /// /// Feature is supported by image but not present on it. /// /// Message. /// Inner. public FeatureNotPresentImageException(string message, Exception inner) : base(message, inner) { } /// /// Feature is supported by image but not present on it. /// /// Message. public FeatureNotPresentImageException(string message) : base(message) { } /// /// Feature is supported by image but not present on it. /// /// Info. /// Context. protected FeatureNotPresentImageException(SerializationInfo info, StreamingContext context) { if(info == null) throw new ArgumentNullException(nameof(info)); } } /// /// Feature is supported by image but not by the disc it represents. /// [Serializable] public class FeaturedNotSupportedByDiscImageException : Exception { /// /// Feature is supported by image but not by the disc it represents. /// /// Message. /// Inner. public FeaturedNotSupportedByDiscImageException(string message, Exception inner) : base(message, inner) { } /// /// Feature is supported by image but not by the disc it represents. /// /// Message. public FeaturedNotSupportedByDiscImageException(string message) : base(message) { } /// /// Feature is supported by image but not by the disc it represents. /// /// Info. /// Context. protected FeaturedNotSupportedByDiscImageException(SerializationInfo info, StreamingContext context) { if(info == null) throw new ArgumentNullException(nameof(info)); } } /// /// Corrupt, incorrect or unhandled feature found on image /// [Serializable] public class ImageNotSupportedException : Exception { /// /// Corrupt, incorrect or unhandled feature found on image /// /// Message. /// Inner. public ImageNotSupportedException(string message, Exception inner) : base(message, inner) { } /// /// Corrupt, incorrect or unhandled feature found on image /// /// Message. public ImageNotSupportedException(string message) : base(message) { } /// /// Corrupt, incorrect or unhandled feature found on image /// /// Info. /// Context. protected ImageNotSupportedException(SerializationInfo info, StreamingContext context) { if(info == null) throw new ArgumentNullException(nameof(info)); } } }