Package org.eolang
Class PhSafe
- java.lang.Object
-
- org.eolang.PhSafe
-
public final class PhSafe extends Object implements Phi, Atom
An object with coordinates (line and position) and a safe processing of any runtime errors.It is used to wrap any object and provide a safe processing of any runtime errors. It is used in the EO runtime to provide a safe processing of any runtime errors in the EO code. If, in any method invocation, a runtime error occurs, it is caught and wrapped into
EOerror.ExError
with the location of the error in the EO code.- Since:
- 0.21
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eolang.Data
Data.ToPhi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Phi
copy()
Make a copy, leaving it at the same parent.byte[]
delta()
Take the data.boolean
equals(Object obj)
String
forma()
Get forma of the phi.int
hashCode()
boolean
hasRho()
Returns true if object has bound rho attribute.Phi
lambda()
Executes λ function and calculates object.String
locator()
Get code locator of the phi.void
put(int pos, Phi object)
Put object by position of the attribute.void
put(String nme, Phi object)
Put object by name of the attribute.Phi
take(String name)
Take object by name of the attribute.
-
-
-
Method Detail
-
copy
public Phi copy()
Description copied from interface:Phi
Make a copy, leaving it at the same parent.
-
hasRho
public boolean hasRho()
Description copied from interface:Phi
Returns true if object has bound rho attribute.
-
take
public Phi take(String name)
Description copied from interface:Phi
Take object by name of the attribute.
-
put
public void put(int pos, Phi object)
Description copied from interface:Phi
Put object by position of the attribute.
-
put
public void put(String nme, Phi object)
Description copied from interface:Phi
Put object by name of the attribute.
-
delta
public byte[] delta()
Description copied from interface:Data
Take the data.
-
-