From d7864697854fc07192d537949f7712776d652156 Mon Sep 17 00:00:00 2001 From: Michael Bebenita Date: Tue, 27 Jul 2010 23:13:33 -0700 Subject: Add a warning interface to rust_srv. --- src/rt/rust.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/rt/rust.cpp') diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp index 37398655..2200df11 100644 --- a/src/rt/rust.cpp +++ b/src/rt/rust.cpp @@ -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() { -- cgit v1.2.3