The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
InternalOperationInterfaceError.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5  //
6 // -------------------------------------------------------------------------- //
7 // //
9 
10 using System;
11 using System.Collections.Generic;
12 using System.Text;
13 
14 using TypeSystem;
15 
16 namespace ErrorManagement {
18 
21  #region Constructor
22 
23  public InternalOperationInterfaceError(String operation, String element, Location location)
24  : base(location) {
25  if (String.IsNullOrEmpty(element))
26  this.body(operation);
27  else
28  this.body(operation, element);
29  }
30 
31 
33  : base(location) {
34  this.body(operation);
35  }
36 
37  private void body(String operation, String element) {
38  StringBuilder aux = new StringBuilder();
39  aux.AppendFormat("Internal Error [{0}]. Element '{1}' cannot use operation [2] interface.", this.location, element, operation);
40  this.Description = aux.ToString();
41  }
42  private void body(String operation) {
43  StringBuilder aux = new StringBuilder();
44  aux.AppendFormat("Internal Error [{0}].Se ha invocado a la operacion de interface [1] con un argumento nulo", this.location, operation);
45  this.Description = aux.ToString();
46  }
47 
48  #endregion
49  }
50 }
InternalOperationInterfaceError(String operation, Location location)
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
InternalOperationInterfaceError(String operation, String element, Location location)
Represents an adapter of existing features in every error.
Definition: ErrorAdapter.cs:23