This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/11004] New: error catching syntax
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 23 Nov 2009 18:28:37 -0000
- Subject: [Bug translator/11004] New: error catching syntax
- Reply-to: sourceware-bugzilla at sourceware dot org
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.