wasCSharpSQLite – Blame information for rev

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 /*
2 * TclNumArgsException.java
3 *
4 * Copyright (c) 1997 Sun Microsystems, Inc.
5 *
6 * See the file "license.terms" for information on usage and
7 * redistribution of this file, and for a DISCLAIMER OF ALL
8 * WARRANTIES.
9 *
10 * Included in SQLite3 port to C# for use in testharness only; 2008 Noah B Hart
11 *
12 * RCS @(#) $Id: TclVarException.java,v 1.1.1.1 1998/10/14 21:09:19 cvsadmin Exp $
13 *
14 */
15 using System;
16 namespace tcl.lang
17 {
18  
19 /// <summary> This exception is used to report variable errors in Tcl.</summary>
20  
21 class TclVarException : TclException
22 {
23  
24 /// <summary> Creates an exception with the appropiate Tcl error message to
25 /// indicate an error with variable access.
26 ///
27 /// </summary>
28 /// <param name="interp">currrent interpreter.
29 /// </param>
30 /// <param name="name1">first part of a variable name.
31 /// </param>
32 /// <param name="name2">second part of a variable name. May be null.
33 /// </param>
34 /// <param name="operation">either "read" or "set".
35 /// </param>
36 /// <param name="reason">a string message to explain why the operation fails..
37 /// </param>
38  
39 internal TclVarException( Interp interp, string name1, string name2, string operation, string reason )
40 : base( TCL.CompletionCode.ERROR )
41 {
42 if ( interp != null )
43 {
44 interp.resetResult();
45 if ( (System.Object)name2 == null )
46 {
47 interp.setResult( "can't " + operation + " \"" + name1 + "\": " + reason );
48 }
49 else
50 {
51 interp.setResult( "can't " + operation + " \"" + name1 + "(" + name2 + ")\": " + reason );
52 }
53 }
54 }
55 }
56 }