Skip to content

Commit

Permalink
BirthdayCalendar adding log in catch clause
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerPacific committed Jul 27, 2024
1 parent 74871fa commit ff49d6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/utils.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:convert';
import 'dart:developer';
import 'package:birthday_calendar/service/storage_service/storage_service.dart';
import 'package:flutter/material.dart';
import 'package:flutter_contacts/contact.dart';
Expand Down Expand Up @@ -27,7 +28,9 @@ class Utils {
try {
Map<String, dynamic> json = jsonDecode(payload);
userBirthday = UserBirthday.fromJson(json);
} catch (e) {}
} on Exception catch (e) {
log("Failed converting payload to UserBirthday object", error: e);
}

return userBirthday;
}
Expand Down

0 comments on commit ff49d6c

Please sign in to comment.