diff options
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/startup.tcl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/helper/startup.tcl b/src/helper/startup.tcl index 41137f1a..eb965e00 100644 --- a/src/helper/startup.tcl +++ b/src/helper/startup.tcl @@ -303,3 +303,11 @@ add_help_text srst_deasserted "Overridable procedure run when srst deassert is d proc srst_asserted {} { puts "Sensed nSRST asserted." } + +# catch any exceptions, capture output and return output +proc capture_catch {a} { + catch { + capture {uplevel $a} + } result + return $result +} |