Skip to content

Commit

Permalink
remove debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Jan 22, 2024
1 parent d7f6735 commit 1e83aad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions runtime/pointers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ export class PointerProperty<T=any> extends Ref<T> {
* @returns
*/
public static get<const Key, Parent extends PointerPropertyParent<Key,unknown>>(parent: Parent|Pointer<Parent>, key: Key, leak_js_properties = false): PointerProperty<Parent extends Map<unknown, infer MV> ? MV : Parent[Key&keyof Parent]> {

console.warn("getpp",parent,key)
if (Pointer.isRef(key)) throw new Error("Cannot use a reference as a pointer property key");

let pointer:Pointer;
Expand All @@ -587,7 +587,13 @@ export class PointerProperty<T=any> extends Ref<T> {
// get current pointer property
public override get val():T {
// this.handleBeforePrimitiveValueGet();
return this.pointer.getProperty(this.key, this.#leak_js_properties);
const val = this.pointer.getProperty(this.key, this.#leak_js_properties);
if (this.pointer instanceof LazyPointer) return "lazy..."
else if (val === NOT_EXISTING) {
console.log(this)
throw new Error(`Property ${this.key} does not exist in ${this.pointer}`);
}
else return val;
}

public override get current_val():T {
Expand Down
1 change: 0 additions & 1 deletion types/addressing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ export class Endpoint extends Target {
}
// could not reach endpoint
catch (e) {
console.warn("ping out failed " + this, e, new Date().getTime())
resolve_online!(this.#current_online = false)
}

Expand Down

0 comments on commit 1e83aad

Please sign in to comment.