How to use the @nestjs/core/errors/exceptions/runtime.exception.RuntimeException function in @nestjs/core

To help you get started, weโ€™ve selected a few @nestjs/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nestjs / nest / packages / microservices / microservices-module.ts View on Github external
public setupListeners(container, server: Server & CustomTransportStrategy) {
    if (!this.listenersController) {
      throw new RuntimeException();
    }
    const modules = container.getModules();
    modules.forEach(({ routes }, module) =>
      this.bindListeners(routes, server, module),
    );
  }
github nestjs / nest / src / microservices / microservices-module.ts View on Github external
public setupClients(container) {
    if (!this.listenersController) {
      throw new RuntimeException();
    }
    const modules = container.getModules();
    modules.forEach(({ routes, components }) => {
      this.bindClients(routes);
      this.bindClients(components);
    });
  }
github nestjs / nest / packages / microservices / microservices-module.ts View on Github external
public setupClients(container) {
    if (!this.listenersController) {
      throw new RuntimeException();
    }
    const modules = container.getModules();
    modules.forEach(({ routes, components }) => {
      this.bindClients(routes);
      this.bindClients(components);
    });
  }
github nestjs / nest / lib / microservices / microservices-module.js View on Github external
setupListeners(container, server) {
        if (!this.listenersController) {
            throw new runtime_exception_1.RuntimeException();
        }
        const modules = container.getModules();
        modules.forEach(({ routes }, module) => this.bindListeners(routes, server, module));
    }
    setupClients(container) {
github nestjs / nest / src / microservices / microservices-module.ts View on Github external
public setupListeners(container, server: Server & CustomTransportStrategy) {
    if (!this.listenersController) {
      throw new RuntimeException();
    }
    const modules = container.getModules();
    modules.forEach(({ routes }, module) =>
      this.bindListeners(routes, server, module),
    );
  }
github nestjs / nest / bundle / microservices / microservices-module.js View on Github external
setupListeners(container, server) {
        if (!this.listenersController) {
            throw new runtime_exception_1.RuntimeException();
        }
        const modules = container.getModules();
        modules.forEach(({ routes }, module) => this.bindListeners(routes, server, module));
    }
    setupClients(container) {
github nestjs / nest / bundle / microservices / microservices-module.js View on Github external
setupClients(container) {
        if (!this.listenersController) {
            throw new runtime_exception_1.RuntimeException();
        }
        const modules = container.getModules();
        modules.forEach(({ routes, components }) => {
            this.bindClients(routes);
            this.bindClients(components);
        });
    }
    bindListeners(controllers, server, module) {
github nestjs / nest / packages / websockets / middleware-injector.ts View on Github external
public bindMiddleware(
    token: string,
    components: Map>,
  ) {
    if (!components.has(token)) {
      throw new RuntimeException();
    }
    const { instance } = components.get(token);
    if (!this.isGatewayMiddleware(instance)) return null;

    const middleware = instance.resolve();
    return isFunction(middleware) ? middleware.bind(instance) : null;
  }
github nestjs / nest / src / websockets / middlewares-injector.ts View on Github external
public bindMiddleware(
    token: string,
    components: Map>,
  ) {
    if (!components.has(token)) {
      throw new RuntimeException();
    }
    const { instance } = components.get(token);
    if (!this.isGatewayMiddleware(instance)) return null;

    const middleware = instance.resolve();
    return isFunction(middleware) ? middleware.bind(instance) : null;
  }
github nestjs / nest / lib / websockets / middlewares-injector.js View on Github external
bindMiddleware(token, components) {
        if (!components.has(token)) {
            throw new runtime_exception_1.RuntimeException();
        }
        const { instance } = components.get(token);
        if (!this.isGatewayMiddleware(instance))
            return null;
        const middleware = instance.resolve();
        return shared_utils_1.isFunction(middleware) ? middleware.bind(instance) : null;
    }
    isGatewayMiddleware(middleware) {