[Mapbender-commits] r8460 - in trunk/mapbender/http: classes geoportal

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Aug 17 04:01:21 PDT 2012


Author: armin11
Date: 2012-08-17 04:01:21 -0700 (Fri, 17 Aug 2012)
New Revision: 8460

Modified:
   trunk/mapbender/http/classes/class_wmc.php
   trunk/mapbender/http/geoportal/gaz_geom_mobile.php
Log:
Less exceptions

Modified: trunk/mapbender/http/classes/class_wmc.php
===================================================================
--- trunk/mapbender/http/classes/class_wmc.php	2012-08-17 10:26:58 UTC (rev 8459)
+++ trunk/mapbender/http/classes/class_wmc.php	2012-08-17 11:01:21 UTC (rev 8460)
@@ -548,8 +548,8 @@
 
 					$LegendResources = $xpath->query("../../wmc:StyleList/wmc:Style/wmc:LegendURL/wmc:OnlineResource",$WMSId);
 					foreach ($LegendResources as $LegendResource) {
-							$e = new mb_exception("class_wmc.php: old getlegendurl (WMC): ".$LegendResource->getAttribute("xlink:href"));
-							$e = new mb_exception("class_wmc.php: new getlegendurl (OWSPROXY): ".$wmsGetLegendUrl);
+							$e = new mb_notice("class_wmc.php: old getlegendurl (WMC): ".$LegendResource->getAttribute("xlink:href"));
+							$e = new mb_notice("class_wmc.php: new getlegendurl (OWSPROXY): ".$wmsGetLegendUrl);
 							//get param part of getlegend url from xml
 							$arURL = parse_url($LegendResource->getAttribute("xlink:href"));
 							$query = $arURL["query"];

Modified: trunk/mapbender/http/geoportal/gaz_geom_mobile.php
===================================================================
--- trunk/mapbender/http/geoportal/gaz_geom_mobile.php	2012-08-17 10:26:58 UTC (rev 8459)
+++ trunk/mapbender/http/geoportal/gaz_geom_mobile.php	2012-08-17 11:01:21 UTC (rev 8460)
@@ -85,7 +85,7 @@
 }
 
 
-$e = new mb_exception("maxResults: ".$maxResults);
+$e = new mb_notice("maxResults: ".$maxResults);
 $con = pg_connect("host=".GEOMDB_HOST." port=".GEOMDB_PORT." dbname=".GEOMDB_NAME." user=".GEOMDB_USER." password=".GEOMDB_PASSWORD)
 or die('Verbindungsaufbau fehlgeschlagen: ' . pg_last_error());
 
@@ -139,18 +139,18 @@
 $toleranceSH = 1000*$factor;
 
 
-$e = new mb_exception("gaz_geom_mobile was invoked with string:".$sstr);
+$e = new mb_notice("gaz_geom_mobile was invoked with string:".$sstr);
 /****** Workflow *********************************/
 /**/
 $test = str_replace("ß", "ss", $sstr);
-$e = new mb_exception("replaced test string: ".$test);
+$e = new mb_notice("replaced test string: ".$test);
 $astr = split(",",replaceChars($sstr));
-$e = new mb_exception("replaced string: ".$astr[0]." ".$astr[1]." ".$astr[2]);
+$e = new mb_notice("replaced string: ".$astr[0]." ".$astr[1]." ".$astr[2]);
 //if only one string without any comma is given
 if(count($astr) == 1){
 
 	$astr[0] = trim($astr[0]);
-	$e = new mb_exception("gaz_geom_mobile: only one string detected: ".$astr[0]);
+	$e = new mb_notice("gaz_geom_mobile: only one string detected: ".$astr[0]);
 	//check if there may be a postal code
 	$plz = getPlz($astr[0]);
 	//check if there is a housenumber
@@ -175,7 +175,7 @@
 //if 2 parts are given - the first one may be a combined or a single value
 // '56743 mendig' or 'ferdinand-sauerbruch-strasse 15' or 'koblenz' or 'mendig' or, or, or ...
 else if(count($astr) == 2){
-	$e = new mb_exception("gaz_geom_mobile: two strings detected: ".$astr[0]." and ".$astr[1]);
+	$e = new mb_notice("gaz_geom_mobile: two strings detected: ".$astr[0]." and ".$astr[1]);
 	$astr[0] = trim($astr[0]);
 	$astr[1] = trim($astr[1]);
 	$ckeys = array();
@@ -192,7 +192,7 @@
 	// check first entry for postal code
 	if(getPlz($astr[0])){
 		$myplz = getPlz($astr[0]);
-		$e = new mb_exception("gaz_geom_mobile: postalcode detected: ".$myplz);
+		$e = new mb_notice("gaz_geom_mobile: postalcode detected: ".$myplz);
 		if(getNr($astr[1])){
 			$mynr = getNr($astr[1]);
 			$myzs = getAppendix($astr[1]);
@@ -207,7 +207,7 @@
 		$mynr = getNr($astr[0]);
 		$myzs = getAppendix($astr[0]);
 		$mystr = getStrn($astr[0]);
-		$e = new mb_exception('gaz_geom_mobile: search for streetname: '.$mystr);
+		$e = new mb_notice('gaz_geom_mobile: search for streetname: '.$mystr);
 		//check if in second value there is a postalcode
 		if(getPlz($astr[1])){
 			$myplz = getPlz($astr[1]);
@@ -215,7 +215,7 @@
 		//maybe it will be a city name
 		else{
 			$mycity = trim($astr[1]);
-			$e = new mb_exception('gaz_geom_mobile: search for city: '.$mycity);
+			$e = new mb_notice('gaz_geom_mobile: search for city: '.$mycity);
 		}
 	}
 	//check second for postal code
@@ -288,7 +288,7 @@
 				$res = db_prep_query($sql,$v,$t);
 				while($row = db_fetch_array($res)){
 					$show = encode($row["strassenname"])."  ".$cnames[$i];
-					$e = new mb_exception('gaz_geom_mobile: street found: '.$row["strassenname"]);
+					$e = new mb_notice('gaz_geom_mobile: street found: '.$row["strassenname"]);
 					stack_it($arraySTR,"str",$show,"str",$row["srid"],$row["minx"],$row["miny"],$row["maxx"],$row["maxy"],$row["gml"]);
 				}
 			}
@@ -359,7 +359,7 @@
 				$res = db_prep_query($sql,$v,$t);
 				while($row = db_fetch_array($res)){
 					array_push($str_schl, $row['strassenschluessel']);
-					$e = new mb_exception('gaz_geom_mobile: strassenschluessel: '.$row["strassenname"].' for '.$s.' found' );	
+					$e = new mb_notice('gaz_geom_mobile: strassenschluessel: '.$row["strassenname"].' for '.$s.' found' );	
 					array_push($str_schl_gem, $cnames[$i]);
 				}
 			}
@@ -445,7 +445,7 @@
 		while($row = db_fetch_array($res)){
 			
 			$show = $row["name"]." ".$row["hausnummer"];
-			$e = new mb_exception('gaz_geom_mobile.php: streetname2: '.$row["name"]);
+			$e = new mb_notice('gaz_geom_mobile.php: streetname2: '.$row["name"]);
 			//$show = $row["name"]." ".$row["hausnummer"]; TODO: see above
 			if($row["zusatz"] != null){
 				$show .= $row["zusatz"];	



More information about the Mapbender_commits mailing list