From 56a83c9984d43b858bf09bedb277643197bc6a25 Mon Sep 17 00:00:00 2001 From: austin Date: Tue, 3 Sep 2024 22:39:01 -0400 Subject: [PATCH] more robust error message --- src/main/java/electrosphere/main/util/ClassSourceUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/electrosphere/main/util/ClassSourceUtils.java b/src/main/java/electrosphere/main/util/ClassSourceUtils.java index bd0e345..cac7904 100644 --- a/src/main/java/electrosphere/main/util/ClassSourceUtils.java +++ b/src/main/java/electrosphere/main/util/ClassSourceUtils.java @@ -71,7 +71,10 @@ public class ClassSourceUtils { for(MethodSource methodRaw : methods){ if(methodRaw.getName().equals(methodName)){ if(methodSource != null){ - throw new UnknownError("Two methods in a source file have the same name. This is unsupported by the addOrReplaceMethod function at this time!"); + String message = "Two methods in a source file have the same name. This is unsupported by the addOrReplaceMethod function at this time!\n" + + "Method name: " + methodName + ; + throw new UnknownError(message); } methodSource = methodRaw; }