2
0
mirror of https://github.com/esiur/esiur-js.git synced 2025-09-13 15:13:18 +00:00

Warehouse

This commit is contained in:
2025-08-10 23:12:44 +03:00
parent 10aa5d2a22
commit 8facd5c9ef

View File

@@ -43,6 +43,8 @@ import IRecord from '../Data/IRecord.js';
import TemplateType from './Template/TemplateType.js'; import TemplateType from './Template/TemplateType.js';
import DistributedResource from '../Net/IIP/DistributedResource.js'; import DistributedResource from '../Net/IIP/DistributedResource.js';
import IEnum from '../Data/IEnum.js'; import IEnum from '../Data/IEnum.js';
import AsyncException from '../Core/AsyncException.js';
import ExceptionCode from '../Core/ExceptionCode.js';
export class WH extends IEventHandler export class WH extends IEventHandler
{ {
@@ -212,8 +214,12 @@ export class WH extends IEventHandler
async put(name, resource, store, parent, customTemplate = null, age = 0, manager = null, attributes = null){ async put(name, resource, store, parent, customTemplate = null, age = 0, manager = null, attributes = null){
if (resource.instance != null) let rt = new AsyncReply();
throw new Error("Resource has a store.");
if (resource.instance != null){
rt.triggerError(new AsyncException(0, ExceptionCode.GeneralFailure, "Resource has a store"));
return rt;
}
let path = name.replace(/^\\/g, "").split("/"); let path = name.replace(/^\\/g, "").split("/");