Commit 262fca4e369adc7bb8b3c94c31b9a0249778f405

Authored by Edmar Moretti
1 parent 35d707c1

Incluida a listagem de erros no final do mapa

Showing 1 changed file with 11 additions and 1 deletions   Show diff stats
testamapfile.php
... ... @@ -55,6 +55,7 @@ if (!function_exists('ms_GetVersion'))
55 55 else
56 56 {dl('php_mapscript.so');}
57 57 }
  58 +ms_ResetErrorList();
58 59 if(!isset($tipo))
59 60 {$tipo = "";}
60 61 if ($tipo == "")
... ... @@ -122,7 +123,16 @@ if (isset($map) && $map != "")
122 123 $objImagem->saveImage($nomec);
123 124 $nomer = ($objImagem->imageurl).basename($nomec);
124 125 if($tipo == "")
125   - {echo "<img src=".$nomer." />";}
  126 + {
  127 + echo "<img src=".$nomer." />";
  128 + echo "<br>Erros:<br>";
  129 + $error = ms_GetErrorObj();
  130 + while($error && $error->code != MS_NOERR)
  131 + {
  132 + echo "<br>Error in %s: %s<br>", $error->routine, $error->message;
  133 + $error = $error->next();
  134 + }
  135 + }
126 136 else
127 137 {
128 138 Header("Content-type: image/png");
... ...