fix(core): Fixes errors from missing files (#511)
This commit is contained in:
parent
ea5d09a7d7
commit
8006fa20df
10 changed files with 54 additions and 14 deletions
|
|
@ -17,6 +17,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using Server.Json;
|
||||
|
||||
|
|
@ -51,6 +52,10 @@ namespace Server
|
|||
|
||||
var stopwatch = Stopwatch.StartNew();
|
||||
var maps = JsonConfig.Deserialize<List<MapDefinition>>(path);
|
||||
if (maps == null)
|
||||
{
|
||||
throw new JsonException($"Failed to deserialize {path}.");
|
||||
}
|
||||
|
||||
foreach (var def in maps)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue