mirror of
https://github.com/encounter/engine.git
synced 2026-03-30 11:09:55 -07:00
29 lines
771 B
Java
29 lines
771 B
Java
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
package io.flutter.plugin.common;
|
|
|
|
import android.util.Log;
|
|
|
|
import io.flutter.BuildConfig;
|
|
|
|
/**
|
|
* Thrown to indicate that a Flutter method invocation failed on the Flutter side.
|
|
*/
|
|
public class FlutterException extends RuntimeException {
|
|
private static final String TAG = "FlutterException#";
|
|
|
|
public final String code;
|
|
public final Object details;
|
|
|
|
FlutterException(String code, String message, Object details) {
|
|
super(message);
|
|
if (BuildConfig.DEBUG && code == null) {
|
|
Log.e(TAG, "Parameter code must not be null.");
|
|
}
|
|
this.code = code;
|
|
this.details = details;
|
|
}
|
|
}
|