f7
f7 is a spreadsheet formula execution library
git clone https://git.vogt.world/f7.git
Log | Files | README.md | LICENSE.md
← All files
name: src/main/java/io/protobase/f7/models/ErrorNode.java
-rw-r--r--
860
 1package io.protobase.f7.models;
 2
 3import com.google.common.base.MoreObjects;
 4import io.protobase.f7.errors.F7Exception;
 5
 6/**
 7 * Error node is a literal representation of an F7 error. For now, this wraps an {@link F7Exception}.
 8 */
 9public class ErrorNode extends BaseObject implements Node {
10  private F7Exception value;
11
12  /**
13   * Create a new error node from an exception.
14   *
15   * @param value exception.
16   */
17  public ErrorNode(F7Exception value) {
18    this.value = value;
19  }
20
21  /**
22   * Get the exception value.
23   *
24   * @return exception.
25   */
26  public F7Exception getValue() {
27    return value;
28  }
29
30  @Override
31  public String toString() {
32    return MoreObjects.toStringHelper(this)
33        .add("value", value)
34        .toString();
35  }
36
37  @Override
38  public Object[] significantAttributes() {
39    return new Object[]{
40        value
41    };
42  }
43
44}