Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Links Error Codes / Language

Quote Reply
Links Error Codes / Language
Code:
# Setup the language for GT::SQL.
local $GT::SQL::ERRORS->{ILLEGALVAL} = Links::language('ADD_ILLEGALVAL');
local $GT::SQL::ERRORS->{UNIQUE} = Links::language('ADD_UNIQUE');
local $GT::SQL::ERRORS->{NOTNULL} = Links::language('ADD_NOTNULL');
local $Links::Link::ERRORS->{NOCATEGORY} = Links::language('ADD_NOCATEGORY');
$Links::Link::ERRORS ||= {}; # silence -w

# Add the record.
my $id = $db->add ( $input );
$input->{ID} = $id;
if (! $id) {
my $error = "<ul><li>" . join ("<li>", $db->error) . "</ul>";
return { error => "<ul>$error</ul>", Category => $category };
}


Alex,

Could you explain why/when you'd need to assign the error values to the SQL module?




PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread Links Error Codes / Language pugdog 1821 Dec 19, 2001, 9:48 PM
Thread Re: [pugdog] Links Error Codes / Language
Alex 1748 Dec 27, 2001, 9:38 AM
Post Re: [Alex] Links Error Codes / Language
pugdog 1747 Dec 27, 2001, 6:22 PM