Skip to content
Snippets Groups Projects
Select Git revision
  • 1e9a9f90c21bfae4cb7d4398f78550a61f3db4d9
  • master default protected
  • basic-profiling
  • report
  • 0.9 protected
5 results

Program.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ErrorRenderer.php 448 B
    <?php
    
    namespace api\util;
    
    use Slim\Interfaces\ErrorRendererInterface;
    
    class ErrorRenderer implements ErrorRendererInterface
    {
        public function __invoke(\Throwable $exception, bool $displayErrorDetails): string
        {
            $message = $exception instanceof \stack_exception ? $exception->getMessage() : "An Error occured while processing the question";
            return json_encode(array(
                'message' => $message
            ));
        }
    
    }