Hi,
try
{
if($session_id eq '')
{
#create new session
$session = new CGI::Session(undef, $cgi, {Directory=>'/tmp/'})
+;
}
else
{
#reinitialse with session with session id
$session= new CGI::Session(undef, $session_id, {Directory=>'/
+tmp'});
}
return $session;
}
catch IOException with
{
my $ex = shift;
if (!$self->raiseException())
{
warn("IOException occurred - " . $ex->getMessage());
return;
}
}
This is my function to create session and if it fails to find a file it should simply return not to show the user message like "500 internal server error"
Please help me on this that how can i efficiently write my exception to deal with this.
Regards