Package org.eolang
Class PhSafe
java.lang.Object
org.eolang.PhSafe
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 -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Make a copy, leaving it at the same parent.Copy self object.byte[]delta()Take the data.booleanforma()Get forma of the phi.inthashCode()booleanhasRho()Returns true if object has bound rho attribute.lambda()Executes λ function and calculates object.locator()Get code locator of the phi.voidPut object by position of the attribute.voidPut object by name of the attribute.take(int pos) Take object by position of the attribute.Take object by name of the attribute.
-
Constructor Details
-
PhSafe
Ctor.- Parameters:
phi- The object
-
PhSafe
Ctor.- Parameters:
phi- The objectprg- Name of the programlne- Linepos- Position
-
PhSafe
Ctor.- Parameters:
phi- The objectprg- Name of the programlne- Linepos- Positionloc- Locationoname- Original name
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
copy
Description copied from interface:PhiMake a copy, leaving it at the same parent. -
hasRho
public boolean hasRho()Description copied from interface:PhiReturns true if object has bound rho attribute. -
take
Description copied from interface:PhiTake object by name of the attribute. -
take
Description copied from interface:PhiTake object by position of the attribute. -
put
Description copied from interface:PhiPut object by position of the attribute. -
put
Description copied from interface:PhiPut object by name of the attribute. -
locator
Description copied from interface:PhiGet code locator of the phi. -
forma
Description copied from interface:PhiGet forma of the phi. -
copy
Description copied from interface:PhiCopy self object. -
delta
public byte[] delta()Description copied from interface:DataTake the data. -
lambda
Description copied from interface:AtomExecutes λ function and calculates object.
-