@dolittle/sdk.projections
Version:
Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.
20 lines • 1.32 kB
JavaScript
;
// Copyright (c) Dolittle. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeIsNotAProjection = void 0;
const rudiments_1 = require("@dolittle/rudiments");
/**
* Exception that gets thrown when trying to associate a type that is not a projection.
*/
class TypeIsNotAProjection extends rudiments_1.Exception {
/**
* Initialises a new instance of the {@link TypeIsNotAProjection} class.
* @param {Constructor<any> | any} type - The type that is not a projection.
*/
constructor(type) {
super(`Type ${type.name} is not a projection. Did you add the @projection() decorator to the type?`);
}
}
exports.TypeIsNotAProjection = TypeIsNotAProjection;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVHlwZUlzTm90QVByb2plY3Rpb24uanMiLCJzb3VyY2VSb290IjoiLi4vIiwic291cmNlcyI6WyJTdG9yZS9UeXBlSXNOb3RBUHJvamVjdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0NBQStDO0FBQy9DLHFHQUFxRzs7O0FBRXJHLG1EQUFnRDtBQUdoRDs7R0FFRztBQUNILE1BQWEsb0JBQXFCLFNBQVEscUJBQVM7SUFDL0M7OztPQUdHO0lBQ0gsWUFBWSxJQUE0QjtRQUNwQyxLQUFLLENBQUMsUUFBUSxJQUFJLENBQUMsSUFBSSw0RUFBNEUsQ0FBQyxDQUFDO0lBQ3pHLENBQUM7Q0FDSjtBQVJELG9EQVFDIn0=