Skip to content
Snippets Groups Projects
Commit b8d1861c authored by Lukasz Butkowski's avatar Lukasz Butkowski
Browse files

[core] error exit on src module add failure

parent d2dd73b2
Branches
Tags
No related merge requests found
......@@ -146,7 +146,7 @@ proc ::fwfwk::addSrcModule {ns ModuleName TclFile} {
if { [namespace exists ${ns}::${ModuleName}] } {
puts "# ERROR: namespace ${ns}::${ModuleName} already exists, please add Module: ${ModuleName} only one time "
exit
exit -2
}
# check if Tcl file exist before creating new namespace
......@@ -163,8 +163,8 @@ proc ::fwfwk::addSrcModule {ns ModuleName TclFile} {
if { [ file isfile $TclFile ] } {
set ::fwfwk::tmp [file normalize $TclFile ]
} else {
puts "\n# WARNING: ${ns}::${ModuleName} cannot open Tcl file, namespace not created\n"
return
puts "\n# ERROR: ${ns}::${ModuleName} cannot open Tcl file, namespace not created\n"
exit -2
}
cd $curDir
}
......
......@@ -18,6 +18,7 @@
namespace eval ::fwfwk {}
global Exit
set Exit 0
# -----------------------------------------------------------------------------
# main
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment