Skip to content

Commit

Permalink
add Error definitions and implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
FadySalama committed Jan 29, 2024
1 parent 1a59159 commit 9ca1bff
Showing 1 changed file with 115 additions and 0 deletions.
115 changes: 115 additions & 0 deletions WoT/Errors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,123 @@

namespace WoT.Errors
{
class EvalError : Exception
{
public EvalError() : base() { }
public EvalError(string messsage) : base(messsage) { }
public EvalError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"EvalError: {this.Message}";
}

}
class RangeError : Exception
{
public RangeError() : base() { }
public RangeError(string messsage) : base(messsage) { }
public RangeError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"RangeError: {this.Message}";
}

}
class ReferenceError : Exception
{
public ReferenceError() : base() { }
public ReferenceError(string messsage) : base(messsage) { }
public ReferenceError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"ReferenceError: {this.Message}";
}

}
class TypeError : Exception
{
public TypeError() : base() { }
public TypeError(string messsage) : base(messsage) { }
public TypeError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"TypeError: {this.Message}";
}
}
class URIError : Exception
{
public URIError() : base() { }
public URIError(string messsage) : base(messsage) { }
public URIError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"URIError: {this.Message}";
}

}
class NotFoundError : Exception
{
public NotFoundError() : base() { }
public NotFoundError(string messsage) : base(messsage) { }
public NotFoundError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"NotFoundError: {this.Message}";
}
}

class NotSupportedError : Exception
{
public NotSupportedError() : base() { }
public NotSupportedError(string messsage) : base(messsage) { }
public NotSupportedError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"NotSupportedError: {this.Message}";
}
}

class SyntaxErrpr : Exception
{
public SyntaxErrpr() : base() { }
public SyntaxErrpr(string messsage) : base(messsage) { }
public SyntaxErrpr(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"SyntaxErrpr: {this.Message}";
}
}

class NotReadableError: Exception
{
public NotReadableError() : base() { }
public NotReadableError(string messsage) : base(messsage) { }
public NotReadableError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"NotReadableError: {this.Message}";
}
}

class OperationError : Exception
{
public OperationError() : base() { }
public OperationError(string messsage) : base(messsage) { }
public OperationError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"OperationError: {this.Message}";
}
}

class NotAllowedError : Exception
{
public NotAllowedError() : base() { }
public NotAllowedError(string messsage) : base(messsage) { }
public NotAllowedError(string messsage, Exception inner) : base(messsage, inner) { }
public new string ToString()
{
return $"NotAllowedError: {this.Message}";
}
}
}

0 comments on commit 9ca1bff

Please sign in to comment.