summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php
diff options
context:
space:
mode:
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