The WalrusMonitoring class handle the developer toolbar, the Walrus process timing and also the exception and error handling.

Developer toolbar
Walrus developer toolbar

The Walrus developer toolbar is shown only in development mode and display some information:

  • Exception number
  • HTTP status
  • Walrus execution time
  • Compiled config file number

A click on the Walrus logo will redirect you to the correct documentation version

Exception handling
Walrus developer toolbar

The exception handling system provided by Walrus is a tool made to help you in your debugging process. This panel can show multiple Exceptions and can also help you to debug PHP errors.

The exception panel is divide in two part:

  • The left side show you the call stack of the exception
  • the right part show you the whole function where the exception is thrown and the function comment block

Like the developer toolbar, the exception panel is shown only when you use walrus in development mode. When you use Walrus in production mode all Exception and error are not showed but saved in a log file in the logs/ directory

Walrus Exception

You can catch your exceptions using the Walrus Exception catcher and debug tool by using the WalrusException class:

    use Walrus\core\WalrusException;

    class TestClass {

        public function testException ()
            throw new WalrusException('Exception message');