All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.java.com.debughelper.tools.r8.shaking.ProguardRuleParserException Maven / Gradle / Ivy

The newest version!
// Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.debughelper.tools.r8.shaking;

import com.debughelper.tools.r8.origin.Origin;
import com.debughelper.tools.r8.Diagnostic;
import com.debughelper.tools.r8.position.Position;

public class ProguardRuleParserException extends Exception implements Diagnostic {

  private final String message;
  private final String snippet;
  private final Origin origin;
  private final com.debughelper.tools.r8.position.Position position;

  public ProguardRuleParserException(String message, String snippet, Origin origin,
      com.debughelper.tools.r8.position.Position position) {
    this.message = message;
    this.snippet = snippet;
    this.origin = origin;
    this.position = position;
  }

  public ProguardRuleParserException(String message, String snippet, Origin origin,
                                     com.debughelper.tools.r8.position.Position position, Throwable cause) {
    this(message, snippet,origin, position);
    initCause(cause);
  }

  @Override
  public Origin getOrigin() {
    return origin;
  }

  @Override
  public Position getPosition() {
    return position;
  }

  @Override
  public String getDiagnosticMessage() {
    return message + " at " + snippet;
  }

  @Override
  public String getMessage() {
    return message + " at " + snippet;
  }

  public String getParseError() {
    return message;
  }

  public String getSnippet() {
    return snippet;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy