From 03c767db6aea583bb00e56b1ac74bf29e8169a91 Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Sun, 7 Apr 2019 15:45:09 -0500 Subject: [PATCH] fix: Mark weaver as failed if serializing invalid type --- Assets/Mirror/Editor/Weaver/Readers.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Mirror/Editor/Weaver/Readers.cs b/Assets/Mirror/Editor/Weaver/Readers.cs index 1d1140c02..9daa75af0 100644 --- a/Assets/Mirror/Editor/Weaver/Readers.cs +++ b/Assets/Mirror/Editor/Weaver/Readers.cs @@ -106,7 +106,7 @@ public static MethodReference GetReadFunc(TypeReference variable, int recursionC if (newReaderFunc == null) { - Log.Error("GetReadFunc unable to generate function for:" + variable.FullName); + Weaver.Error("GetReadFunc unable to generate function for:" + variable.FullName); return null; } RegisterReadFunc(variable.FullName, newReaderFunc); @@ -126,7 +126,7 @@ static MethodDefinition GenerateArrayReadFunc(TypeReference variable, MethodRefe { if (!variable.IsArrayType()) { - Log.Error(variable.FullName + " is an unsupported array type. Jagged and multidimensional arrays are not supported"); + Weaver.Error(variable.FullName + " is an unsupported array type. Jagged and multidimensional arrays are not supported"); return null; } string functionName = "_ReadArray" + variable.GetElementType().Name + "_"; @@ -251,7 +251,7 @@ static MethodDefinition GenerateStructReadFunction(TypeReference variable, int r MethodDefinition ctor = Resolvers.ResolveDefaultPublicCtor(variable); if (ctor == null) { - Log.Error("The class " + variable.Name + " has no default constructor or it's private, aborting."); + Weaver.Error("The class " + variable.Name + " has no default constructor or it's private, aborting."); return null; }