Add a warning interface to rust_srv.

This commit is contained in:
Michael Bebenita
2010-07-27 23:13:33 -07:00
committed by Graydon Hoare
parent 6afb6c767e
commit d786469785
3 changed files with 15 additions and 2 deletions

View File

@@ -94,6 +94,16 @@ rust_srv::fatal(char const *expr, char const *file, size_t line)
exit(1);
}
void
rust_srv::warning(char const *expr, char const *file, size_t line)
{
char buf[1024];
snprintf(buf, sizeof(buf),
"warning: '%s', at: %s:%d",
expr, file, (int)line);
log(buf);
}
rust_srv *
rust_srv::clone()
{