This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/11004] New: error catching syntax


We need something more fine than --skip-badvars to tolerate
run-time errors associated with $expression evaluation.
Something like this:

try {
   stmt1 ... 
} catch (varname) {
   stmt2 ...
}

semantics being: optional "varname" would get assigned the error
string, and stmt2 would be evaluated, should the stmt1 block be
departed due to an error (that sets context->last_error).

This would be used for $variable protection thusly:

for (i=0; i<100; i++) {
  try {
    println("%d", $var->field[i])
  } catch {
    println("oops")
    # don't break to continue iteration; or break to leave early
  }
}

-- 
           Summary: error catching syntax
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11004

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]