Skip to content

Commit 2504d3b

Browse files
committed
Log errors while loading commands in the CLI
1 parent ab2e015 commit 2504d3b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

grails-shell/src/main/groovy/org/grails/cli/profile/commands/factory/ApplicationContextCommandFactory.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.grails.cli.profile.commands.factory
1717

18+
import grails.build.logging.GrailsConsole
1819
import grails.util.Named
1920
import org.grails.cli.gradle.commands.GradleTaskCommandAdapter
2021
import org.grails.cli.profile.Command
@@ -40,6 +41,7 @@ class ApplicationContextCommandFactory implements CommandFactory {
4041

4142
return commands.collect() { Named named -> new GradleTaskCommandAdapter(profile, named) }
4243
} catch (Throwable e) {
44+
GrailsConsole.instance.error("Error occurred loading commands: $e.message", e)
4345
return []
4446
}
4547
}

0 commit comments

Comments
 (0)