package org.realityforge.arez.gwt.examples;

import elemental2.dom.DomGlobal;
import javax.annotation.Nonnull;
import org.realityforge.arez.ArezContext;

final class ExampleUtil
{
  private ExampleUtil()
  {
  }

  static void logAllErrors( @Nonnull final ArezContext context )
  {
    context.addObserverErrorHandler( ( observer, error, throwable ) -> {
      DomGlobal.console.log( "Observer error: " + error + "\nobserver: " + observer );
      if ( null != throwable )
      {
        DomGlobal.console.log( throwable );
      }
    } );
  }
}

@@ -141,71 +141,259 @@
 Arez
-Context;%0A%0Afinal class ExampleUtil%0A%7B%0A  private ExampleUtil()%0A  %7B
+;%0Aimport org.realityforge.arez.ArezContext;%0Aimport org.realityforge.arez.extras.WhyRun;%0A%0Afinal class ExampleUtil%0A%7B%0A  private ExampleUtil()%0A  %7B%0A  %7D%0A%0A  static void whyRun()%0A  %7B%0A    DomGlobal.console.log( new WhyRun( Arez.context().getSpy() ).whyRun() );
 %0A  %7D

Add whyRun helper