aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-31 17:38:32 +0100
committerJustin Clark-Casey (justincc)2011-08-31 17:38:32 +0100
commit3aa86d22d16cbf82702024bdfc9846a4c3147232 (patch)
tree6281d3adc1583b05b0a34015f83d31c8410bcbe0 /OpenSim
parentrefactor: move multiple class to set avatar height into associated SP.AddToPh... (diff)
downloadopensim-SC_OLD-3aa86d22d16cbf82702024bdfc9846a4c3147232.zip
opensim-SC_OLD-3aa86d22d16cbf82702024bdfc9846a4c3147232.tar.gz
opensim-SC_OLD-3aa86d22d16cbf82702024bdfc9846a4c3147232.tar.bz2
opensim-SC_OLD-3aa86d22d16cbf82702024bdfc9846a4c3147232.tar.xz
If a FireAndForget thread terminates with an exception, then catch and log rather than letting it terminate the simulator.
Exceptions don't appear to do this with the SmartThreadPool but they do with UnsafeQueueUserWorkItem (and maybe others)
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Util.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 51ced7b..745da17 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -1508,7 +1508,21 @@ namespace OpenSim.Framework
1508 // When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture 1508 // When OpenSim interacts with a database or sends data over the wire, it must send this in en_US culture
1509 // so that we don't encounter problems where, for instance, data is saved with a culture that uses commas 1509 // so that we don't encounter problems where, for instance, data is saved with a culture that uses commas
1510 // for decimals places but is read by a culture that treats commas as number seperators. 1510 // for decimals places but is read by a culture that treats commas as number seperators.
1511 WaitCallback realCallback = delegate(object o) { Culture.SetCurrentCulture(); callback(o); }; 1511 WaitCallback realCallback = delegate(object o)
1512 {
1513 Culture.SetCurrentCulture();
1514
1515 try
1516 {
1517 callback(o);
1518 }
1519 catch (Exception e)
1520 {
1521 m_log.ErrorFormat(
1522 "[UTIL]: Continuing after async_call_method thread terminated with exception {0}{1}",
1523 e.Message, e.StackTrace);
1524 }
1525 };
1512 1526
1513 switch (FireAndForgetMethod) 1527 switch (FireAndForgetMethod)
1514 { 1528 {