summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php
diff options
context:
space:
mode:
authorwei <>2006-11-26 22:15:58 +0000
committerwei <>2006-11-26 22:15:58 +0000
commita8b3ebe8f62c3888b216d827c1c5dcba8a47d4e1 (patch)
tree5eef79dbc5e2f506047fa463cb427a40a7bd8441 /framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php
parent6773dfe453682d2b39a26fbabef8e706bf6bb412 (diff)
Adding active record implementation.
Diffstat (limited to 'framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php')
-rw-r--r--framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php b/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php
new file mode 100644
index 00000000..ec177a84
--- /dev/null
+++ b/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php
@@ -0,0 +1,39 @@
+<?php
+/**
+ * TActiveRecordException class file.
+ *
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @version $Id$
+ * @package System.Data.ActiveRecord.Exceptions
+ */
+
+/**
+ * Base exception class for Active Records.
+ *
+ * @author Wei Zhuo <weizho[at]gmail[dot]com>
+ * @version $Id$
+ * @package System.Data.ActiveRecord.Exceptions
+ * @since 3.1
+ */
+class TActiveRecordException extends TException
+{
+ /**
+ * @return string path to the error message file
+ */
+ protected function getErrorMessageFile()
+ {
+ $lang=Prado::getPreferredLanguage();
+ $path = dirname(__FILE__);
+ $msgFile=$path.'/messages-'.$lang.'.txt';
+ if(!is_file($msgFile))
+ $msgFile=$path.'/messages.txt';
+ return $msgFile;
+ }
+}
+
+class TActiveRecordConfigurationException extends TActiveRecordException
+{
+
+}
+
+?> \ No newline at end of file