aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/PrologException.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/PrologException.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/PrologException.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/PrologException.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/PrologException.cs
index 9a1f00d..56ed719 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/PrologException.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/YieldProlog/PrologException.cs
@@ -1,20 +1,20 @@
1/* 1/*
2 * Copyright (C) 2007-2008, Jeff Thompson 2 * Copyright (C) 2007-2008, Jeff Thompson
3 * 3 *
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright 11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * * Neither the name of the copyright holder nor the names of its contributors 14 * * Neither the name of the copyright holder nor the names of its contributors
15 * may be used to endorse or promote products derived from this software 15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission. 16 * without specific prior written permission.
17 * 17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
@@ -54,7 +54,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
54 /// This uses YP.makeCopy to copy the ErrorTerm and Message so that they are valid after unbinding. 54 /// This uses YP.makeCopy to copy the ErrorTerm and Message so that they are valid after unbinding.
55 /// </summary> 55 /// </summary>
56 /// <param name="ErrorTerm">the error term of the error</param> 56 /// <param name="ErrorTerm">the error term of the error</param>
57 /// <param name="Messsage">the message term of the error. If this is a string, it is converted to an 57 /// <param name="Messsage">the message term of the error. If this is a string, it is converted to an
58 /// Atom so it can be used by Prolog code. 58 /// Atom so it can be used by Prolog code.
59 /// Message, converted to a string, is use as the printable exception message. 59 /// Message, converted to a string, is use as the printable exception message.
60 /// </param> 60 /// </param>
@@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
66 _term = YP.makeCopy(new Functor2(Atom.a("error"), ErrorTerm, Message), new Variable.CopyStore()); 66 _term = YP.makeCopy(new Functor2(Atom.a("error"), ErrorTerm, Message), new Variable.CopyStore());
67 } 67 }
68 68
69 public class TypeErrorInfo 69 public class TypeErrorInfo
70 { 70 {
71 public readonly Atom _Type; 71 public readonly Atom _Type;
72 public readonly object _Culprit; 72 public readonly object _Culprit;
@@ -116,14 +116,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
116 /// <returns></returns> 116 /// <returns></returns>
117 public object getProcedureName() 117 public object getProcedureName()
118 { 118 {
119 if (!(_Type._name == "procedure" && 119 if (!(_Type._name == "procedure" &&
120 _Culprit is Functor2 && ((Functor2)_Culprit)._name == Atom.SLASH)) 120 _Culprit is Functor2 && ((Functor2)_Culprit)._name == Atom.SLASH))
121 return null; 121 return null;
122 return ((Functor2)_Culprit)._arg1; 122 return ((Functor2)_Culprit)._arg1;
123 } 123 }
124 124
125 /// <summary> 125 /// <summary>
126 /// If _Type is procedure and _Culprit is name/arity and arity is an integer, return the arity. 126 /// If _Type is procedure and _Culprit is name/arity and arity is an integer, return the arity.
127 /// Otherwise return -1. 127 /// Otherwise return -1.
128 /// </summary> 128 /// </summary>
129 /// <returns></returns> 129 /// <returns></returns>