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 
+}
 
        return [string map {\n <br/> { } { } \t {        } > > < < / /} $a]
 }
 
-# catch any exceptions, capture output and return it 
-proc capture_catch {a} {
-       catch {
-               capture {uplevel $a}
-       } result
-       return $result 
-}
-
 proc first_flash_base {} {
        set t [lindex 0 [ocd_flash_banks]]
        return $t(base)