Skip to content

Commit fc8a92e

Browse files
author
Fujimoto Seiji
committed
Guarantee that Logger.Get() never fails
Signed-off-by: Fujimoto Seiji <[email protected]>
1 parent 0f185d4 commit fc8a92e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Logger.cs

+9-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@ public class QueueLogger
1212

1313
public static string[] Get()
1414
{
15-
Init();
16-
return s_queue.ToArray();
15+
try
16+
{
17+
Init();
18+
return s_queue.ToArray();
19+
}
20+
catch
21+
{
22+
return new string[0];
23+
}
1724
}
1825

1926
private static void NoException(Action func)

0 commit comments

Comments
 (0)