Skip to content

Commit c83b2a6

Browse files
committed
fix: error for price history load need not have message
1 parent adfa8c3 commit c83b2a6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/features/bitcoin_price/presentation/cubit/price_chart_cubit.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ import 'package:freezed_annotation/freezed_annotation.dart';
88
part 'price_chart_cubit.freezed.dart';
99
part 'price_chart_state.dart';
1010

11+
class PriceHistoryLoadException implements Exception {
12+
const PriceHistoryLoadException();
13+
14+
@override
15+
String toString() => 'PriceHistoryLoadException';
16+
}
17+
1118
class PriceChartCubit extends Cubit<PriceChartState> {
1219
PriceChartCubit({
1320
required GetPriceHistoryUsecase getPriceHistoryUsecase,
@@ -103,7 +110,7 @@ class PriceChartCubit extends Cubit<PriceChartState> {
103110
isLoading: false,
104111
prices: [],
105112
currency: selectedCurrency,
106-
error: Exception('Failed to load price history'),
113+
error: const PriceHistoryLoadException(),
107114
),
108115
);
109116
}

0 commit comments

Comments
 (0)