<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I can't find an example of a vmod's function indicating an error --
other than returning <tt>NULL</tt> in <tt>std.readfile()</tt>.<br>
<br>
Besides normal results, my vmod's functions can fail due to a number
of reasons and I'd like to be able to, at least, indicate them to
the caller (<tt>vcl_recv</tt>) so an intelligent status can be
returned to the client: some times the error ought to be 403 (my
module checks credentials), and some times it must be 500 (internal
error, an exception), for example.<br>
<br>
Currently I log such exceptions with syslog(3) and return a static
string to <tt>vcl_recv</tt>. But then there is no (easy) way to
distinguish the kinds of failures...<br>
<br>
Is there a proper way to do this? Something like <tt>SetStatus(sp,
int status, const char *format, ...)</tt>? Thanks!<br>
<blockquote>-mi<br>
</blockquote>
</body>
</html>