mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
log sql exceptions
This commit is contained in:
@@ -9,11 +9,13 @@ import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
import '../log.dart';
|
||||
import '../models/music.dart';
|
||||
import '../models/query.dart';
|
||||
import '../models/settings.dart';
|
||||
import '../models/support.dart';
|
||||
import 'converters.dart';
|
||||
import 'error_logging_database.dart';
|
||||
|
||||
part 'database.g.dart';
|
||||
|
||||
@@ -435,7 +437,11 @@ LazyDatabase _openConnection() {
|
||||
final dbFolder = await getApplicationDocumentsDirectory();
|
||||
final file = File(p.join(dbFolder.path, 'subtracks.sqlite'));
|
||||
// return NativeDatabase.createInBackground(file, logStatements: true);
|
||||
return NativeDatabase.createInBackground(file);
|
||||
|
||||
return ErrorLoggingDatabase(
|
||||
NativeDatabase.createInBackground(file),
|
||||
(e, s) => log.severe('SQL Error', e, s),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user