[Mapbender-dev] Exception handling

Astrid Emde (WhereGroup) astrid.emde at wheregroup.com
Tue Apr 17 11:20:38 EDT 2007


Hi christoph,

you way of error handling sounds very reasonable for me. I don't miss
anything. Lookslike a good idea.

cool

greetings astrid

On Fri, April 13, 2007 3:13 pm, Christoph Baudson (WhereGroup) wrote:
> Hello everyone,
>
> today I added a more sophisticated exception handling to Mapbender. It
> is just a draft and may be enhanced at anytime. Please let me know if
> you think this is a sensible approach or if you have additional
> suggestions.
>
> -----
>
> Description:
>
> check mapbender.conf. There are new constants:
>
> define("LOG_LEVEL", "warning");
>
> this is the log level. Choose from the following list.
>
> define("LOG_LEVEL_LIST", "off,error,warning,all");
>
> The list is hierarchical:
>
> off: ignores all
> error: logs errors only
> warning: logs errors and warnings
> all: logs errors and warnings (and maybe others in the future)
>
> Throw an exception (as before) via
>
> $e = new mb_exception($message);
>
> A warning may be thrown like this
>
> $e = new mb_warning($message);
>
> Both classes are inherited from mb_log, which basically is the "old"
> mb_exception. For possible new types, a new class may be added easily.
>
> For JavaScript exceptions, there are the following options
>
> "on": via AJAX to PHP, then written in the error log file
> "alert": the exception is being alerted
> "console": the exception is being displayed by Firebug
> "off": ignores JS exceptions
>
> set via
>
> define("LOG_JS", "on");
>
> Throw it via
>
> var e = new Mb_exception(message);
> var e = new Mb_warning(message);
>
> As each JS exception triggers an AJAX request, it might be sensible to
> consider turning them off (or use console/alert).
>
> --
> Baudson Christoph
> http://www.wheregroup.com
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
>


Mit freundlichen Grüßen

Astrid Emde


----------------------------------

  Astrid Emde
  WhereGroup GmbH & Co.KG
  Siemensstraße 8
  D-53121 Bonn

  Fon: +49(0)228 90 90 38 - 19
  Fax: +49(0)228 90 90 38 - 11

  astrid.emde at wheregroup.com
  http://www.wheregroup.com



More information about the Mapbender_dev mailing list