| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -731,12 +731,19 @@ internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw, MethodBase i | |||
| 731 | 731 | ||
| 732 | 732 | if (binding == null) | |
| 733 | 733 | { | |
| 734 | - var value = "No method matches given arguments"; | ||
| 734 | + var value = new StringBuilder("No method matches given arguments"); | ||
| 735 | 735 | if (methodinfo != null && methodinfo.Length > 0) | |
| 736 | 736 | { | |
| 737 | - value += $" for {methodinfo[0].Name}"; | ||
| 737 | + value.Append($" for {methodinfo[0].Name}"); | ||
| 738 | 738 | } | |
| 739 | - Exceptions.SetError(Exceptions.TypeError, value); | ||
| 739 | + else if (list.Count > 0) | ||
| 740 | + { | ||
| 741 | + value.Append($" for {list[0].MethodBase.Name}"); | ||
| 742 | + } | ||
| 743 | + | ||
| 744 | + value.Append(": "); | ||
| 745 | + AppendArgumentTypes(to: value, args); | ||
| 746 | + Exceptions.RaiseTypeError(value.ToString()); | ||
| 740 | 747 | return IntPtr.Zero; | |
| 741 | 748 | } | |
| 742 | 749 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments