public static function build() {
        try {
            self::init();
            self::dependencies();
    
            $route = self::canRoute();
    
            if ($route !== false) {
                $actionContext = self::actionContext($route);
    
                if ($actionContext !== null && !self::cached($actionContext)) {
                    self::filters($actionContext);
                    self::headers();
                    self::validation();
                    self::render($actionContext);
                }
            }
        }
        catch (\Exception $ex) {
            $errorHandlerEventArgs = new ErrorHandlerEventArgs($ex);
            self::invokeAll(self::$appContext->getErrorHandler(), array($errorHandlerEventArgs));

            if ($errorHandlerEventArgs->getHandled() !== true) {
                throw $ex;
            }
        }
    }