Sha256: 33d57a09f800d1c5a2e67987f79a551942a47067ed9d5ef647a4748dfc81fe4b

Contents?: true

Size: 921 Bytes

Versions: 21

Compression:

Stored size: 921 Bytes

Contents

package com.amplify.honeydew_server;

import org.apache.commons.lang.exception.ExceptionUtils;

public class Result {
    public final boolean success;
    public String description;
    public String errorMessage;
    public String stackTrace;

    public static Result OK = new Result();
    public static Result FAILURE = new Result(false);

    public Result() {
        this(true);
    }

    public Result(boolean success) {
        this(success, success ? "Success!" : "Failure.");
    }

    public Result(boolean success, String description) {
        this.success = success;
        this.description = description;
    }

    public Result(String errorMessage, Throwable exception) {
        this(errorMessage);
        this.stackTrace = ExceptionUtils.getFullStackTrace(exception);
    }

    public Result(String errorMessage) {
        this.success = false;
        this.errorMessage = errorMessage;
    }
}

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
honeydew-0.29.1 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.29.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.28.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.27.4 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.27.3 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.27.2 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.27.1 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.27.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.25.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.24.1 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.24.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.23.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.22.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.21.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.20.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.19.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.18.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.17.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.16.0 server/src/main/java/com/amplify/honeydew_server/Result.java
honeydew-0.15.0 server/src/main/java/com/amplify/honeydew_server/Result.java