@@ -324,20 +324,18 @@ object Splicer {
324
324
try classLoader.loadClass(name)
325
325
catch {
326
326
case _ : ClassNotFoundException =>
327
- val msg = s " Could not find class $name in classpath $extraMsg "
327
+ val msg = s " Could not find class $name in classpath "
328
328
throw new StopInterpretation (msg, pos)
329
329
}
330
330
331
331
private def getMethod (clazz : Class [? ], name : Name , paramClasses : List [Class [? ]]): Method =
332
332
try clazz.getMethod(name.toString, paramClasses : _* )
333
333
catch {
334
334
case _ : NoSuchMethodException =>
335
- val msg = em " Could not find method ${clazz.getCanonicalName}. $name with parameters ( $paramClasses%, %) $extraMsg "
335
+ val msg = em " Could not find method ${clazz.getCanonicalName}. $name with parameters ( $paramClasses%, %) "
336
336
throw new StopInterpretation (msg, pos)
337
337
}
338
338
339
- private def extraMsg = " . The most common reason for that is that you apply macros in the compilation run that defines them"
340
-
341
339
private def stopIfRuntimeException [T ](thunk : => T , method : Method ): T =
342
340
try thunk
343
341
catch {
@@ -351,7 +349,7 @@ object Splicer {
351
349
throw new StopInterpretation (sw.toString, pos)
352
350
case ex : InvocationTargetException =>
353
351
ex.getTargetException match {
354
- case ClassDefinedInCurrentRun (sym) =>
352
+ case MissingClassDefinedInCurrentRun (sym) =>
355
353
if (ctx.settings.XprintSuspension .value)
356
354
ctx.echo(i " suspension triggered by a dependency on $sym" , pos)
357
355
ctx.compilationUnit.suspend() // this throws a SuspendException
@@ -371,7 +369,7 @@ object Splicer {
371
369
}
372
370
}
373
371
374
- private object ClassDefinedInCurrentRun {
372
+ private object MissingClassDefinedInCurrentRun {
375
373
def unapply (targetException : NoClassDefFoundError )(given ctx : Context ): Option [Symbol ] = {
376
374
val className = targetException.getMessage
377
375
val sym = ctx.base.staticRef(className.toTypeName).symbol
0 commit comments