The StaDyn Programming Language
Source code documentation of StaDyn, a hybrid static and dynamic typing language.
ParserError.cs
Go to the documentation of this file.
1 // -------------------------------------------------------------------------- //
3 // Project rROTOR //
4 // -------------------------------------------------------------------------- //
5 // File: ParserError.cs //
6 // Author: Cristina Gonzalez Muņoz - cristi.gm@gmail.com //
7 // Description: //
8 // Represents the error occurred while the source code is parsing. //
9 // -------------------------------------------------------------------------- //
10 // Create date: 15-12-2006 //
11 // Modification date: 18-12-2006 //
13 
14 using System;
15 using System.Collections.Generic;
16 using System.Text;
17 
18 namespace ErrorManagement
19 {
23  public class ParserError : ErrorAdapter
24  {
25  #region Constructor
26 
34  public ParserError(Location loc, string description)
35  : base(loc)
36  {
37  StringBuilder aux = new StringBuilder();
38  aux.AppendFormat("An error occurred while the file {0} is parsing.\r\n{1}", loc.FileName, description);
39  this.Description = aux.ToString();
40  }
41 
42  #endregion
43  }
44 }
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
ParserError(Location loc, string description)
Constructor of ParserError.
Definition: ParserError.cs:34
Represents the error occurred while the source code is parsing.
Definition: ParserError.cs:23
Represents an adapter of existing features in every error.
Definition: ErrorAdapter.cs:23