Gossamer Forum
Home : Products : DBMan : Customization :

what's new - change generic error

Quote Reply
what's new - change generic error
hello,
I've been through both forums and found lost of good information on this mod but ....
I was wondering if any has changed the error that is sent to view search from the what's new mod?

I mean, that when there's "nothing new" that standard error is sent to ouput:

"There were problems with the search. Reason: no matching records.
Please fix any errors and submit the record again."

Well, this is a given since nothing is new so there shouldn't be any matching records.

What I'd like to do is have message that says something like "sorry, nothing has been added recently. would you like to search for something else instead?"

OK, the error message is lame but ... it would be nice to see somthing else instead.



Quote Reply
Re: what's new - change generic error In reply to
Ok, in db.cgi

I did this:

if($in{'listnew'}) {
($db_total_hits == 0) and return ("no new records.");
}
else {
($db_total_hits == 0) and return ("no matching records.");
}

and in html.pl

if($in{'listnew'}) {
# < -- Start page text -- >
print qq|
<$font><P>Sorry there were
<$error_color><B>$message</B></FONT></p>
Would you like to Search for something instead?</p>
|;
# < -- End page text -->
}
else {
# < -- Start page text -- >
print qq|
<$font><P>There were problems with the search. Reason:
<$error_color><B>$message</B></FONT>
<BR>Please fix any errors and submit the record again.</p>
|;
# < -- End page text -->
}

:) it's even got my hoky doky message in ...

Will, this case any troubles .... ???
or has anybody done this a better way .... ???

any comments or help would be appreciated.