0.462.0.416719
This commit is contained in:
@ -109,7 +109,7 @@ namespace RobloxFiles.XmlFormat
|
||||
if (!tokenHandler.ReadProperty(prop, propNode) && RobloxFile.LogErrors)
|
||||
{
|
||||
var readError = error($"Could not read property: {prop.GetFullName()}!");
|
||||
Console.Error.WriteLine(readError.Message);
|
||||
RobloxFile.LogError(readError.Message);
|
||||
}
|
||||
|
||||
instance.AddProperty(ref prop);
|
||||
@ -117,7 +117,7 @@ namespace RobloxFiles.XmlFormat
|
||||
else if (RobloxFile.LogErrors)
|
||||
{
|
||||
var tokenError = error($"No {nameof(IXmlPropertyToken)} found for property type: {propType}!");
|
||||
Console.Error.WriteLine(tokenError.Message);
|
||||
RobloxFile.LogError(tokenError.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -142,7 +142,7 @@ namespace RobloxFiles.XmlFormat
|
||||
if (RobloxFile.LogErrors)
|
||||
{
|
||||
var typeError = error($"Unknown class {className} while reading Item.");
|
||||
Console.Error.WriteLine(typeError.Message);
|
||||
RobloxFile.LogError(typeError.Message);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -94,9 +94,7 @@ namespace RobloxFiles.XmlFormat
|
||||
|
||||
if (handler == null)
|
||||
{
|
||||
if (RobloxFile.LogErrors)
|
||||
Console.Error.WriteLine("XmlDataWriter.WriteProperty: No token handler found for property type: {0}", propType);
|
||||
|
||||
RobloxFile.LogError($"XmlRobloxFileWriter.WriteProperty: No token handler found for property type: {propType}");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -30,10 +30,7 @@ namespace RobloxFiles.XmlFormat.PropertyTokens
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (!RobloxFile.LogErrors)
|
||||
return true;
|
||||
|
||||
Console.Error.WriteLine("ContentToken: Got illegal base64 string: {0}", data);
|
||||
RobloxFile.LogError($"ContentToken: Got illegal base64 string: {data}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,11 +97,7 @@ namespace RobloxFiles
|
||||
}
|
||||
else if (refId != "null")
|
||||
{
|
||||
string name = refProp.GetFullName();
|
||||
|
||||
if (LogErrors)
|
||||
Console.Error.WriteLine("XmlRobloxFile: Could not resolve reference for {0}", name);
|
||||
|
||||
LogError($"XmlRobloxFile: Could not resolve reference for {refProp.GetFullName()}");
|
||||
refProp.Value = null;
|
||||
}
|
||||
}
|
||||
@ -112,6 +108,14 @@ namespace RobloxFiles
|
||||
foreach (Property sharedProp in sharedProps)
|
||||
{
|
||||
SharedString shared = sharedProp.CastValue<SharedString>();
|
||||
|
||||
if (shared == null)
|
||||
{
|
||||
var nullBuffer = Array.Empty<byte>();
|
||||
shared = SharedString.FromBuffer(nullBuffer);
|
||||
sharedProp.Value = shared;
|
||||
}
|
||||
|
||||
SharedStrings.Add(shared.Key);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user