The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
ExceptionClauseWrongDerived.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project Stadyn //
4 // -------------------------------------------------------------------------- //
5 // File: ExceptionClauseWrongDerived.cs //
6 // Author: Daniel Zapixo Rodríguezz//
7 // Description: //
8 // Represents a error produced a class not derived from System.Exception is used in a Catch Clasuse. //
9 // -------------------------------------------------------------------------- //
10 // Create date: 5-01-2010 //
11 // Modification date: 5-01-2010 //
13 
14 using System;
15 using System.Collections.Generic;
16 using System.Text;
17 
18 namespace ErrorManagement
19 {
24  {
25  #region Constructor
26 
34  public ExceptionClauseWrongDerived(string id, Location loc)
35  : base(loc)
36  {
37  StringBuilder aux = new StringBuilder();
38  aux.AppendFormat("The exception {0} must be derive from System.Exception.", id);
39  this.Description = aux.ToString();
40  }
41 
42  #endregion
43  }
44 }
ExceptionClauseWrongDerived(string id, Location loc)
Constructor of DefinedTypeError
This class encapsulates a location in a specific file. Implements an Inmutable pattern. So it can be used in any context, that is his internal fields never change.
Definition: Location.cs:24
System.Text.StringBuilder StringBuilder
Definition: CSharpParser.cs:4
Represents a error produced when the defined type already exists.
Represents an adapter of existing features in every error.
Definition: ErrorAdapter.cs:23