1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-11-25 17:29:55 +00:00

print the error message before throwing Exception

This commit is contained in:
Piotr Faba 2020-05-27 19:14:43 +02:00
parent 3c695ba71c
commit f139750bf4

View file

@ -10,8 +10,9 @@ includeConfig params.globalConfig
def determine_global_config() { def determine_global_config() {
if( System.getenv('NXF_GLOBAL_CONFIG') == null) if( System.getenv('NXF_GLOBAL_CONFIG') == null)
{ {
System.err.println("Environment variable NXF_GLOBAL_CONFIG is missing. Set it to point to global.config file") def errorMessage = "ERROR: Environment variable NXF_GLOBAL_CONFIG is missing. Set it to point to global.config file."
throw new Exception("Environment variable NXF_GLOBAL_CONFIG is missing. Set it to point to global.config file") System.err.println(errorMessage)
throw new Exception(errorMessage)
} }
return System.getenv('NXF_GLOBAL_CONFIG') return System.getenv('NXF_GLOBAL_CONFIG')
} }