15 lines
434 B
TypeScript
15 lines
434 B
TypeScript
import { EntityDict } from '@project/oak-app-domain';
|
|
import { SelectOpResult } from 'oak-domain/lib/types/Entity';
|
|
import { makeException as makeDomainException } from 'oak-domain/lib/types/Exception';
|
|
|
|
export default function makeException(data: {
|
|
name: string;
|
|
message?: string;
|
|
opRecords: SelectOpResult<EntityDict>;
|
|
[A: string]: any;
|
|
}) {
|
|
const e = makeDomainException<EntityDict>(data);
|
|
|
|
return e;
|
|
}
|