You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

using System;
using System.Globalization;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
namespace OpenDBDiff.Schema.Misc
{
[Serializable]
public class SchemaException : Exception
{
private static void Write(string message)
{
try
{
StreamWriter writer = new StreamWriter(Path.Combine(Path.GetTempPath(), "OpenDBDiff.log"), true, Encoding.ASCII);
writer.WriteLine("ERROR: " + DateTime.Now.ToString("yyyy/MM/dd hh:mm", CultureInfo.InvariantCulture) + "-" + message);
writer.Close();
}
finally { }
}
public SchemaException() : base()
{
}
public SchemaException(string message)
: base(message)
{
Write(base.StackTrace);
}
public SchemaException(string message, Exception exception)
: base(message, exception)
{
Write(exception.StackTrace);
}
protected SchemaException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}