* [Bug translator/11004] New: error catching syntax
@ 2009-11-23 18:28 fche at redhat dot com
2010-01-18 20:17 ` [Bug translator/11004] " fche at redhat dot com
2010-03-01 18:29 ` fche at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: fche at redhat dot com @ 2009-11-23 18:28 UTC (permalink / raw)
To: systemtap
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-01 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-23 18:28 [Bug translator/11004] New: error catching syntax fche at redhat dot com
2010-01-18 20:17 ` [Bug translator/11004] " fche at redhat dot com
2010-03-01 18:29 ` fche at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).