Skip to content

Commit

Permalink
upd again
Browse files Browse the repository at this point in the history
  • Loading branch information
danylo-safonov-solid committed Sep 21, 2023
1 parent c2f98cb commit acd3600
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ${e.cause}
${e.cause.name}
${e.cause.cause}
${e.cause.message}
${e.cause.fields}
${e.message}
$e
''');
Expand Down
1 change: 1 addition & 0 deletions lib/deno_postgres_interop.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export 'src/command_type.dart';
export 'src/connection.dart';
export 'src/connection_options.dart';
export 'src/encoded_arg.dart';
export 'src/errors/postgres_error.dart';
export 'src/errors/transaction_error.dart';
export 'src/isolation_level.dart';
export 'src/notice.dart';
Expand Down
7 changes: 7 additions & 0 deletions lib/src/errors/connection_error.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'dart:js_interop';

import 'package:deno_postgres_interop/src/errors/js_error.dart';

/// [js/Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error).
@JS('Error')
class ConnectionError extends JSError {}
7 changes: 7 additions & 0 deletions lib/src/errors/connection_params_error.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'dart:js_interop';

import 'package:deno_postgres_interop/src/errors/js_error.dart';

/// [js/Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error).
@JS('Error')
class ConnectionParamsError extends JSError {}
7 changes: 6 additions & 1 deletion lib/src/errors/postgres_error.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import 'dart:js_interop';

import 'package:deno_postgres_interop/src/errors/js_error.dart';
import 'package:deno_postgres_interop/src/notice.dart';

/// [deno-postgres@v0.17.0/PostgresError](https://deno.land/x/postgres@v0.17.0/client/error.ts?s=TransactionError).
@JS()
class PostgresError extends JSError {}
class PostgresError extends JSError {
/// [deno-postgres@v0.17.0/PostgresError](https://deno.land/x/postgres@v0.17.0/client/error.ts?s=PostgresError#prop_fields).
external Notice get fields;
}

0 comments on commit acd3600

Please sign in to comment.