public bool Run() { bool ok = false; try { siloHost.InitializeOrleansSilo(); ok = siloHost.StartOrleansSilo(); if (ok) { Console.WriteLine(string.Format("Successfully started Orleans silo '{0}' as a {1} node.", siloHost.Name, siloHost.Type)); } else { throw new SystemException(string.Format("Failed to start Orleans silo '{0}' as a {1} node.", siloHost.Name, siloHost.Type)); } } catch (Exception exc) { siloHost.ReportStartupError(exc); var msg = string.Format("{0}:\n{1}\n{2}", exc.GetType().FullName, exc.Message, exc.StackTrace); Console.WriteLine(msg); throw new Exception(msg, exc); } return(ok); }
public bool Run() { bool ok = false; try { siloHost.InitializeOrleansSilo(); ok = siloHost.StartOrleansSilo(); if (ok) { Console.WriteLine($"Successfully started Orleans silo '{siloHost.Name}' as a {siloHost.Type.ToString()} node."); } else { throw new SystemException($"Failed to start Orleans silo '{siloHost.Name}' as a {siloHost.Type.ToString()} node."); } } catch (Exception exc) { siloHost.ReportStartupError(exc); var msg = $"{exc.GetType().FullName}:\n{exc.Message}\n{exc.StackTrace}"; Console.WriteLine(msg); } return(ok); }
public bool Run() { try { _siloHost.InitializeOrleansSilo(); if (!_siloHost.StartOrleansSilo()) { throw new SystemException( $"Failed to start Orleans silo '{_siloHost.Name}' as a {_siloHost.Type} node."); } Console.WriteLine($"Successfully started Orleans silo '{_siloHost.Name}' as a {_siloHost.Type} node."); return(true); } catch (Exception exc) { _siloHost.ReportStartupError(exc); var msg = $"{exc.GetType().FullName}:\n{exc.Message}\n{exc.StackTrace}"; Console.WriteLine(msg); return(false); } }