mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-11-10 20:13:09 +00:00
print the error message before throwing Exception
This commit is contained in:
parent
3c695ba71c
commit
f139750bf4
1 changed files with 3 additions and 2 deletions
|
@ -10,8 +10,9 @@ includeConfig params.globalConfig
|
|||
def determine_global_config() {
|
||||
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")
|
||||
throw new Exception("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."
|
||||
System.err.println(errorMessage)
|
||||
throw new Exception(errorMessage)
|
||||
}
|
||||
return System.getenv('NXF_GLOBAL_CONFIG')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue