Skip to content

Commit

Permalink
fix: Mark weaver as failed if serializing invalid type
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach committed Apr 7, 2019
1 parent f310c61 commit 03c767d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Assets/Mirror/Editor/Weaver/Readers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 + "_";
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 03c767d

Please sign in to comment.