The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
OperationNotAllowedError.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: OperationNotAllowedError.cs //
6 // Author: Cristina Gonzalez Mu�oz - cristi.gm@gmail.com //
7 // Description: //
8 // Represents a error produced when tries to make an operation not allowed //
9 // for the specified type. //
10 // -------------------------------------------------------------------------- //
11 // Create date: 12-02-2007 //
12 // Modification date: 23-03-2007 //
14 
15 using System;
16 using System.Collections.Generic;
17 using System.Text;
18 
19 using TypeSystem;
20 
21 namespace ErrorManagement
22 {
28  {
29  #region Constructor
30  public OperationNotAllowedError(string operation, string op1, string op2, Location loc)
39  : base(loc)
40  {
41  StringBuilder aux = new StringBuilder();
42  aux.AppendFormat("The operation '{0}' cannot be applied to operands of type '{1}' and '{2}'.", operation, op1, op2);
43  this.Description = aux.ToString();
44  }
45 
54  public OperationNotAllowedError(string operation, string te, Location loc)
55  : base(loc) {
56  StringBuilder aux = new StringBuilder();
57  aux.AppendFormat("The operation '{0}' cannot be applied to operand of type '{1}'.", operation, te);
58  this.Description = aux.ToString();
59  }
60 
61  #endregion
62  }
63 }
Represents a error produced when tries to make an operation not allowed for the specified type...
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
OperationNotAllowedError(string operation, string te, Location loc)
Constructor of OperationNotAllowedError
Represents an adapter of existing features in every error.
Definition: ErrorAdapter.cs:23
OperationNotAllowedError(string operation, string op1, string op2, Location loc)
Constructor of OperationNotAllowedError