using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Globalization; using GB5Shared.Resource.Framework; using System.Resources; namespace GB5Shared.GB5Exception { public class DatabaseOperationException : Exception { public DatabaseOperationException(string message, Exception innerException) : base(message, innerException) { } public DatabaseOperationException(Exception innerException) : base(FrameworkResource.DatabaseOperation, innerException) { } } public class DataNotFoundException : Exception { public DataNotFoundException(string message) : base(message) { } public DataNotFoundException(Exception innerException) : base(FrameworkResource.DataNotFound, innerException) { } } [Serializable] public class MethodNotAllowedException : Exception { public MethodNotAllowedException(string message) : base(message) { } public MethodNotAllowedException(string message, Exception innerException) : base(message, innerException) { } protected MethodNotAllowedException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { } public MethodNotAllowedException() : base() { } } public class FoundException : Exception { public FoundException(string message) : base(message) { } public FoundException(Exception innerException) : base(FrameworkResource.DataNotFound, innerException) { } public FoundException() : base(FrameworkResource.DataNotFound) { } } public class NotFoundException : Exception { public NotFoundException(string message) : base(message) { } public NotFoundException(Exception innerException) : base(FrameworkResource.DataNotFound, innerException) { } public NotFoundException() : base(FrameworkResource.DataNotFound) { } } /// /// Thrown when a Vault operation (read/write secret, authentication, etc.) fails. /// The message never includes the secret value or Vault token — only the vault path/key. /// public class VaultOperationException : Exception { public VaultOperationException(string message) : base(message) { } public VaultOperationException(string message, Exception innerException) : base(message, innerException) { } } /// /// Thrown when a database server cannot be reached at connection-open time (network /// unreachable, host down, wrong port, firewall drop, DNS failure) — as opposed to a /// credential/config error. The message always names which server/database this was for, /// since the raw ADO.NET exception alone never does. Never includes the password. /// public class DatabaseUnreachableException : Exception { public DatabaseUnreachableException(string message, Exception innerException) : base(message, innerException) { } } }