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.
52 lines
1.3 KiB
52 lines
1.3 KiB
// <file> |
|
// <copyright see="prj:///doc/copyright.txt"/> |
|
// <license see="prj:///doc/license.txt"/> |
|
// <owner name="Luc Morin" email=""/> |
|
// <version>$Revision$</version> |
|
// </file> |
|
|
|
using System; |
|
using ICSharpCode.Core; |
|
using SharpQuery.SchemaClass; |
|
using System.Runtime.Serialization; |
|
|
|
namespace SharpQuery.Exceptions |
|
{ |
|
[Serializable()] |
|
public class ConnectionStringException : Exception |
|
{ |
|
public ConnectionStringException() |
|
: base(StringParser.Parse("${res:SharpQuery.Error.WrongConnectionString}")) |
|
{ |
|
} |
|
|
|
public ConnectionStringException(ISchemaClass schema) |
|
: base(StringParser.Parse("${res:SharpQuery.Error.WrongConnectionString}") |
|
+ "\n\r" |
|
+ "-----------------" |
|
+ "\n\r" |
|
+ "(" + schema.Connection.ConnectionString + ")" |
|
+ "\n\r" |
|
+ "(" + schema.Connection.Name + ")" |
|
) |
|
{ |
|
} |
|
|
|
public ConnectionStringException(string message) |
|
: base(StringParser.Parse("${res:SharpQuery.Error.WrongConnectionString}") |
|
+ "\n\r" |
|
+ "-----------------" |
|
+ "\n\r" |
|
+ message) |
|
{ |
|
} |
|
|
|
public ConnectionStringException(string message, Exception innerException) : base(message, innerException) |
|
{ |
|
} |
|
|
|
protected ConnectionStringException(SerializationInfo info, StreamingContext context) : base(info, context) |
|
{ |
|
} |
|
} |
|
}
|
|
|