blob: 8bac26f17c7dab6c533812a20a2af07f0959f760 [file] [log] [blame]
// 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.
/// Thrown to indicate that an action failed while interacting with the
/// in_app_purchase plugin.
class InAppPurchaseException implements Exception {
/// Creates a [InAppPurchaseException] with the specified source and error
/// [code] and optional [message].
InAppPurchaseException({
required this.source,
required this.code,
this.message,
});
/// An error code.
final String code;
/// A human-readable error message, possibly null.
final String? message;
/// Which source is the error on.
final String source;
@override
String toString() => 'InAppPurchaseException($code, $message, $source)';
}