Skip to content

Commit

Permalink
AtAbsent deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 4, 2024
1 parent 9b2deee commit 5c618ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 68 deletions.
57 changes: 0 additions & 57 deletions eo-runtime/src/main/java/org/eolang/AtAbsent.java

This file was deleted.

25 changes: 14 additions & 11 deletions eo-runtime/src/main/java/org/eolang/PhDefault.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,20 @@ public Phi take(final String name) {
} else {
object = new AtSafe(
this.named(
new AtAbsent(
name,
String.format(
"Can't #take(\"%s\"), the attribute is absent among other %d attrs of %s:(%s), %s and %s are also absent",
name,
this.attrs.size(),
this.form,
String.join(", ", this.attrs.keySet()),
Attr.PHI,
Attr.LAMBDA
)
new AtGetOnly(
() -> {
throw new ExUnset(
String.format(
"Can't #take(\"%s\"), the attribute is absent among other %d attrs of %s:(%s), %s and %s are also absent",
name,
this.attrs.size(),
this.form,
String.join(", ", this.attrs.keySet()),
Attr.PHI,
Attr.LAMBDA
)
);
}
),
name
)
Expand Down

1 comment on commit 5c618ee

@0crat
Copy link

@0crat 0crat commented on 5c618ee Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yegor256 It is not a good idea to push directly to the default branch master. You've earned -16 points. Next time, create a new branch, push your changes over there, then make a pull request and merge it. Even if you are flying solo, contributing via pull requests is a good practice. Your running balance is -64.

Please sign in to comment.