Skip to content

Commit 1e65210

Browse files
committed
Guard against module write failure
1 parent fc61929 commit 1e65210

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Editor/Aspect/Aspect.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,14 @@ static void ProcessFile(string path){
7171
Inject(type, method);
7272
} ptc++;
7373
}
74-
} module.Write(path);
75-
print($"...injected {ptc}/{tc} public types");
74+
}
75+
// TODO clarify error cause
76+
try{
77+
module.Write(path);
78+
print( $"@{path}... injected {ptc}/{tc} public types");
79+
}catch(AssemblyResolutionException ex){
80+
Debug.LogWarning($"Cannot inject module {module}");
81+
}
7682
}
7783

7884
/*

0 commit comments

Comments
 (0)