[Mapbender-commits] r1248 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Mar 28 04:52:05 EDT 2007


Author: christoph
Date: 2007-03-28 04:52:05 -0400 (Wed, 28 Mar 2007)
New Revision: 1248

Modified:
   trunk/mapbender/http/classes/class_mb_exception.php
Log:
draft of class mb_debug (extension of mb_exception)

Modified: trunk/mapbender/http/classes/class_mb_exception.php
===================================================================
--- trunk/mapbender/http/classes/class_mb_exception.php	2007-03-28 08:50:08 UTC (rev 1247)
+++ trunk/mapbender/http/classes/class_mb_exception.php	2007-03-28 08:52:05 UTC (rev 1248)
@@ -25,20 +25,27 @@
 class mb_exception{
 	
 	var $dir = "../../log/";
-//	var $thrown = false;
+	var $filename_prefix = "mb_error_";
 	
 	function mb_exception($n){
 		if(is_dir($this->dir)){
-			$logfile = $this->dir . "mb_error_" . date("Y_m_d") . ".log";
+			$logfile = $this->dir . $this->filename_prefix . date("Y_m_d") . ".log";
 			if($h = fopen($logfile,"a")){
 				$content = date("Y.m.d") . "," . date("H:i:s") . "," . $n .chr(13).chr(10);
 				if(!fwrite($h,$content)){
 					#exit;
 				}
 				fclose($h);
-//				$this->thrown = true;
 			}
 		}
 	}
 }
+
+class mb_debug extends mb_exception {
+	var $filename_prefix = "mb_debug_";
+	
+	function mb_debug($message) {
+		$this->mb_exception($message);
+	}
+}
 ?>
\ No newline at end of file



More information about the Mapbender_commits mailing list