Commit bb2667b0435105cfc13919e9b1146c1376a8ed02

Authored by Edmar Moretti
1 parent ade05bf8

Melhoria na apresentação dos erros encontrados

Showing 1 changed file with 12 additions and 1 deletions   Show diff stats
testamapfile.php
... ... @@ -132,6 +132,7 @@ function verifica($map)
132 132  
133 133 if(($tipo == "") || ($tipo == "todos"))
134 134 echo "<hr><br><br><span style='color:red' ><b>Testando: $tema </span><pre></b>";
  135 + if(!file_exists($tema)){echo "Arquivo ".$map." não encontrado.";exit;}
135 136 if ($tema != "")
136 137 {
137 138 if (strtoupper(substr(PHP_OS, 0, 3) == 'WIN'))
... ... @@ -216,7 +217,17 @@ function verifica($map)
216 217 }
217 218 $objImagem = @$mapa->draw();
218 219 if (!$objImagem)
219   - {echo "Problemas ao gerar o mapa<br>";return;}
  220 + {
  221 + echo "Problemas ao gerar o mapa<br>";
  222 + $error = "";
  223 + $error = ms_GetErrorObj();
  224 + while($error && $error->code != MS_NOERR)
  225 + {
  226 + echo "<br>Error in %s: %s<br>", $error->routine, $error->message;
  227 + $error = $error->next();
  228 + }
  229 + return;
  230 + }
220 231 $nomec = ($objImagem->imagepath).nomeRandomico()."teste.png";
221 232 $objImagem->saveImage($nomec);
222 233 $nomer = ($objImagem->imageurl).basename($nomec);
... ...