UNPKG

1.1 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../src/error/OptimisticLockVersionMismatchError.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH;IAAwD,8DAAK;IAGzD,4CAAY,MAAc,EAAE,eAA4B,EAAE,aAA0B;QAApF,YACI,iBAAO,SAGV;QAND,UAAI,GAAG,oCAAoC,CAAC;QAIxC,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,kCAAkC,CAAC,SAAS,CAAC,CAAC;QAC1E,KAAI,CAAC,OAAO,GAAG,mCAAiC,MAAM,yBAAoB,eAAe,uCAAkC,aAAa,MAAG,CAAC;;IAChJ,CAAC;IAEL,yCAAC;AAAD,CATA,AASC,CATuD,KAAK,GAS5D;AATY,gFAAkC","file":"OptimisticLockVersionMismatchError.js","sourcesContent":["/**\n * Thrown when a version check on an object that uses optimistic locking through a version field fails.\n */\nexport class OptimisticLockVersionMismatchError extends Error {\n name = \"OptimisticLockVersionMismatchError\";\n\n constructor(entity: string, expectedVersion: number|Date, actualVersion: number|Date) {\n super();\n Object.setPrototypeOf(this, OptimisticLockVersionMismatchError.prototype);\n this.message = `The optimistic lock on entity ${entity} failed, version ${expectedVersion} was expected, but is actually ${actualVersion}.`;\n }\n\n}\n"],"sourceRoot":".."}
\No newline at end of file