init
This commit is contained in:
68
Framework/Exceptions/ServerException.cs
Normal file
68
Framework/Exceptions/ServerException.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using Kreta.Framework.Localization;
|
||||
|
||||
namespace Kreta.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// Általános kiszolgáló hiba.
|
||||
/// </summary>
|
||||
[FriendlyName(1000000, "Ismeretlen kiszolgálóhiba történt!")]
|
||||
[Serializable]
|
||||
public class ServerException : FrameworkException
|
||||
{
|
||||
/// <summary>
|
||||
/// A kivétel végzetes-e, vagy sem.
|
||||
/// </summary>
|
||||
public bool IsFatal { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
public ServerException() { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="message">A felhasználónak szánt hibaüzenet</param>
|
||||
public ServerException(string message)
|
||||
: this(message, null, false) { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="message">A felhasználónak szánt hibaüzenet</param>
|
||||
/// <param name="innerException">Az előző kivétel, ami történt</param>
|
||||
public ServerException(string message, Exception innerException)
|
||||
: this(message, innerException, false) { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="info">Sorosítási adatok</param>
|
||||
/// <param name="context">Környezeti információk</param>
|
||||
protected ServerException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context) { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="message">A felhasználónak szánt hibaüzenet</param>
|
||||
/// <param name="isFatal">A kivétel végzetes-e, vagy sem</param>
|
||||
public ServerException(string message, bool isFatal)
|
||||
: this(message, null, isFatal) { }
|
||||
|
||||
/// <summary>
|
||||
/// Az osztály konstruktora.
|
||||
/// </summary>
|
||||
/// <param name="message">A felhasználónak szánt hibaüzenet</param>
|
||||
/// <param name="innerException">Az előző kivétel, ami történt</param>
|
||||
/// <param name="isFatal">A kivétel végzetes-e, vagy sem</param>
|
||||
public ServerException(string message, Exception innerException, bool isFatal)
|
||||
: base(message, innerException)
|
||||
{
|
||||
IsFatal = isFatal;
|
||||
SetValue("IsFatal", isFatal.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user