UNPKG

@nestjs/typeorm

Version:

Nest - modern, fast, powerful node.js web framework (@typeorm)

16 lines (15 loc) 858 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DuplicateDataSourceException = void 0; const typeorm_constants_1 = require("../typeorm.constants"); class DuplicateDataSourceException extends Error { constructor(dataSourceName) { const isDefault = dataSourceName === typeorm_constants_1.DEFAULT_DATA_SOURCE_NAME; const descriptor = isDefault ? 'default (unnamed)' : `"${dataSourceName}"`; super(`A data source with the ${descriptor} name is already registered. ` + `Multiple data sources must be registered with unique names; otherwise, ` + `they will override each other. Please assign a unique "name" property ` + `to each TypeOrmModule.forRoot()/forRootAsync() registration.`); } } exports.DuplicateDataSourceException = DuplicateDataSourceException;