Skip to content

Commit f432727

Browse files
authored
Make sure that exceptions are printed to console, even when ActorSystem instantiation failed. (#84)
1 parent dc38517 commit f432727

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Akka.MultiNode.NodeRunner/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static int Main(string[] args)
129129
specFail.FailureStackTraces.Add(innerEx.StackTrace);
130130
}
131131

132-
_logger.Tell(specFail.ToString());
132+
_logger?.Tell(specFail.ToString());
133133
Console.WriteLine(specFail);
134134

135135
//make sure message is send over the wire
@@ -152,7 +152,7 @@ static int Main(string[] args)
152152
innerEx = innerEx.InnerException;
153153
}
154154

155-
_logger.Tell(specFail.ToString());
155+
_logger?.Tell(specFail.ToString());
156156
Console.WriteLine(specFail);
157157

158158
//make sure message is send over the wire
@@ -173,7 +173,7 @@ private static void FlushLogMessages()
173173
{
174174
try
175175
{
176-
_logger.GracefulStop(TimeSpan.FromSeconds(2)).Wait();
176+
_logger?.GracefulStop(TimeSpan.FromSeconds(2)).Wait();
177177
}
178178
catch
179179
{

0 commit comments

Comments
 (0)