diff --git a/src/IKVM.Runtime/MethodAnalyzer.cs b/src/IKVM.Runtime/MethodAnalyzer.cs index b6a1652c0..778974301 100644 --- a/src/IKVM.Runtime/MethodAnalyzer.cs +++ b/src/IKVM.Runtime/MethodAnalyzer.cs @@ -2485,7 +2485,7 @@ private void ConditionalPatchNoClassDefFoundError(ref ClassFile.Method.Instructi private void SetHardError(RuntimeClassLoader classLoader, ref ClassFile.Method.Instruction instruction, HardError hardError, string message, params object[] args) { string text = string.Format(message, args); -#if IMPORTER + switch (hardError) { case HardError.NoClassDefFoundError: @@ -2518,7 +2518,7 @@ private void SetHardError(RuntimeClassLoader classLoader, ref ClassFile.Method.I default: throw new InvalidOperationException(); } -#endif + instruction.SetHardError(hardError, AllocErrorMessage(text)); }