-%# {{{ BEGIN BPS TAGGED BLOCK
+%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# }}} END BPS TAGGED BLOCK
+%# END BPS TAGGED BLOCK }}}
<%init>
return if $m->is_subrequest; # avoid reentrancy, as suggested by masonbook
# If the session is invalid, create a new session.
if ( $@ =~ /Object does not/i ) {
- tie %session, $session_class, undef,
- $backends{$RT::DatabaseType} ? {
+ tie %session, $session_class, undef, $backends{$RT::DatabaseType}
+ ? {
Handle => $RT::Handle->dbh,
LockHandle => $RT::Handle->dbh,
- } : {
+ }
+ : {
Directory => $RT::MasonSessionDir,
LockDirectory => $RT::MasonSessionDir,
};
undef $cookies{$cookiename};
}
else {
- die "RT Couldn't write to session directory '$RT::MasonSessionDir': $@. Check that this dir ectory's permissions are correct.";
+ die loc("RT couldn't store your session.") . "\n"
+ . loc(
+"This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.",
+ $RT::MasonSessionDir
+ )
+ . "\n\n"
+ . $@;
}
}