aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorDavid Rowe2014-01-25 12:00:11 -0800
committerJustin Clark-Casey (justincc)2014-01-31 00:24:47 +0000
commit3d62f4369d800f854d8306f1ebf4ce5d3de71818 (patch)
tree214f28c1d7ddafd3250d11c89f7b8f3a602b865d /OpenSim/Region/ScriptEngine
parentReplaced llSay()ing LSL errors with calls Error() (diff)
downloadopensim-SC-3d62f4369d800f854d8306f1ebf4ce5d3de71818.zip
opensim-SC-3d62f4369d800f854d8306f1ebf4ce5d3de71818.tar.gz
opensim-SC-3d62f4369d800f854d8306f1ebf4ce5d3de71818.tar.bz2
opensim-SC-3d62f4369d800f854d8306f1ebf4ce5d3de71818.tar.xz
Replaced throwing exceptions with calls to Error()
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 24b473d..ae9f827 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7972,9 +7972,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7972 string encodedData = Convert.ToBase64String(encData_byte); 7972 string encodedData = Convert.ToBase64String(encData_byte);
7973 return encodedData; 7973 return encodedData;
7974 } 7974 }
7975 catch (Exception e) 7975 catch
7976 { 7976 {
7977 throw new Exception("Error in base64Encode" + e.Message); 7977 Error("llBase64ToString", "Error encoding string");
7978 return String.Empty;
7978 } 7979 }
7979 } 7980 }
7980 7981
@@ -7985,9 +7986,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7985 { 7986 {
7986 return Util.Base64ToString(str); 7987 return Util.Base64ToString(str);
7987 } 7988 }
7988 catch (Exception e) 7989 catch
7989 { 7990 {
7990 throw new Exception("Error in base64Decode" + e.Message); 7991 Error("llBase64ToString", "Error decoding string");
7992 return String.Empty;
7991 } 7993 }
7992 } 7994 }
7993 7995
@@ -10678,7 +10680,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10678 if (!ok || flag < 0 || 10680 if (!ok || flag < 0 ||
10679 flag > (int)HttpRequestConstants.HTTP_PRAGMA_NO_CACHE) 10681 flag > (int)HttpRequestConstants.HTTP_PRAGMA_NO_CACHE)
10680 { 10682 {
10681 throw new ScriptException("Parameter " + i.ToString() + " is an invalid flag"); 10683 Error("llHTTPRequest", "Parameter " + i.ToString() + " is an invalid flag");
10682 } 10684 }
10683 10685
10684 param.Add(parameters.Data[i].ToString()); //Add parameter flag 10686 param.Add(parameters.Data[i].ToString()); //Add parameter flag
@@ -10702,12 +10704,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10702 { 10704 {
10703 //There must be at least one name/value pair for custom header 10705 //There must be at least one name/value pair for custom header
10704 if (count == 1) 10706 if (count == 1)
10705 throw new ScriptException("Missing name/value for custom header at parameter " + i.ToString()); 10707 Error("llHTTPRequest", "Missing name/value for custom header at parameter " + i.ToString());
10706 break; 10708 break;
10707 } 10709 }
10708 10710
10709 if (HttpStandardHeaders.Contains(parameters.Data[i].ToString(), StringComparer.OrdinalIgnoreCase)) 10711 if (HttpStandardHeaders.Contains(parameters.Data[i].ToString(), StringComparer.OrdinalIgnoreCase))
10710 throw new ScriptException("Name is invalid as a custom header at parameter " + i.ToString()); 10712 Error("llHTTPRequest", "Name is invalid as a custom header at parameter " + i.ToString());
10711 10713
10712 param.Add(parameters.Data[i].ToString()); 10714 param.Add(parameters.Data[i].ToString());
10713 param.Add(parameters.Data[i+1].ToString()); 10715 param.Add(parameters.Data[i+1].ToString());