// /*************************************************************************** // The Disc Image Chef // ---------------------------------------------------------------------------- // // Filename : Images.cs // Author(s) : Natalia Portillo // // Component : Disc image plugins. // // --[ Description ] ---------------------------------------------------------- // // Defines exceptions to be thrown by disc image plugins. // // --[ License ] -------------------------------------------------------------- // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // ---------------------------------------------------------------------------- // Copyright © 2011-2019 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)); } } }