Commit Diff


commit - 78a9dab553fece83d11427c457b67285d7e8e81c
commit + 0d100d0b102ab0eff3cd9875e2ec38bcc7884978
blob - f79e068133c2fb0e06f9ae5ba4ef810901402831
blob + d99338ac2d74b0dc069b9b59a789b06af43aecf2
--- gotweb/files/htdocs/gotweb/gotweb.css
+++ gotweb/files/htdocs/gotweb/gotweb.css
@@ -220,6 +220,14 @@ body {
 	padding-top: 5px;
 	padding-bottom: 5px;
 	overflow: auto;
+	white-space: pre-wrap;
+}
+#tmpl_err {
+	clear: left;
+	float: left;
+	padding-left: 20px;
+	padding-top: 20px;
+	padding-bottom: 20px;
 	white-space: pre-wrap;
 }
 
blob - dd8286827356c540ca18fc995b71fe8211596e35
blob + 3f18bb205e90a6236a210bbb9c3b947a9dc6190b
--- gotweb/gotweb.c
+++ gotweb/gotweb.c
@@ -1700,7 +1700,17 @@ gw_template(size_t key, void *arg)
 	case(TEMPL_CONTENT):
 		error = gw_query_funcs[gw_trans->action].func_main(gw_trans);
 		if (error) {
+			kerr = khtml_attr(gw_trans->gw_html_req, KELEM_DIV,
+			    KATTR_ID, "tmpl_err", KATTR__MAX);
+			if (kerr != KCGI_OK)
+				return 0;
+			kerr = khttp_puts(gw_trans->gw_req, "Error: ");
+			if (kerr != KCGI_OK)
+				return 0;
 			kerr = khttp_puts(gw_trans->gw_req, error->msg);
+			if (kerr != KCGI_OK)
+				return 0;
+			kerr = khtml_closeelem(gw_trans->gw_html_req, 1);
 			if (kerr != KCGI_OK)
 				return 0;
 		}