Skip to content
Snippets Groups Projects
Select Git revision
  • ppo_algorithm
  • master default protected
  • ma-daxhammer
  • sac
  • ba_weber
  • transformer
  • fix_zscore_normalization
7 results

pom.xml

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
            ));
        }
    
    }