Skip to content

Commit 518071d

Browse files
committed
More targeted catch
1 parent 6a9bcee commit 518071d

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

api/src/org/labkey/api/mcp/McpService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,9 @@ default void register(McpImpl mcp)
133133
if (null != resources && !resources.isEmpty())
134134
registerResources(resources);
135135
}
136-
catch (Exception e)
136+
catch (NoSuchMethodError t)
137137
{
138-
String advice = e.getMessage().contains("victools") ? " Try doing a clean build of API." : "";
139-
LOG.error("Exception while registering MCP implementations. The MCP server will not be available.{}", advice, e);
138+
LOG.error("You likely need to do a clean build of API! Exception while registering an MCP implementation.", t);
140139
}
141140
}
142141

0 commit comments

Comments
 (0)