Catch errors in the hval/hget and return the message as the value
This commit is contained in:
@ -81,7 +81,11 @@ proc test_suite::make_nodes {path result indent} {
|
||||
|
||||
append result "$prefix<component id=\"$nodename\" dataType=\"$type\">\n"
|
||||
if {[string compare -nocase $type "none"] != 0} {
|
||||
set value [test_suite::encode [hval $path]]
|
||||
if [ catch {
|
||||
set value [test_suite::encode [hval $path]]
|
||||
} message ] {
|
||||
set value "HVAL_ERROR:${message}"
|
||||
}
|
||||
append result "$prefix <value>$value</value>\n"
|
||||
}
|
||||
foreach p [test_suite::property_elements $path $newIndent] {
|
||||
|
@ -62,7 +62,11 @@ proc make_nodes {path result indent} {
|
||||
if {"$control" == "true"} {
|
||||
append result "$prefix<component id=\"$nodename\" dataType=\"$type\">\n"
|
||||
if {[string compare -nocase $type "none"] != 0} {
|
||||
set value [encode [hval $path]]
|
||||
if [ catch {
|
||||
set value [encode [hval $path]]
|
||||
} message ] {
|
||||
set value "HVAL_ERROR:${message}"
|
||||
}
|
||||
append result "$prefix <value>$value</value>\n"
|
||||
}
|
||||
foreach p [property_elements $path $newIndent] {
|
||||
@ -126,7 +130,11 @@ proc make_value_nodes {path result indent} {
|
||||
if {"$control" == "true"} {
|
||||
append result "$prefix<component id=\"$nodename\" dataType=\"$type\">\n"
|
||||
if {[string compare -nocase $type "none"] != 0} {
|
||||
set value [encode [hval $path]]
|
||||
if [ catch {
|
||||
set value [encode [hval $path]]
|
||||
} message ] {
|
||||
set value "HVAL_ERROR:${message}"
|
||||
}
|
||||
append result "$prefix <value>$value</value>\n"
|
||||
}
|
||||
foreach x [hlist $path] {
|
||||
|
Reference in New Issue
Block a user