Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
try to parse the dsn on _setDefaultConfiguration
  • Loading branch information
rxlabz committed Oct 28, 2020
commit ea1554740ded5a7e3bb50aa9b84f791fad90490f
3 changes: 3 additions & 0 deletions dart/lib/src/sentry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ class Sentry {
return false;
}

// try parsing the dsn
Dsn.parse(options.dsn);

// if logger os NoOp, let's set a logger that prints on the console
if (options.debug && options.logger == noOpLogger) {
options.logger = dartLogger;
Expand Down
8 changes: 1 addition & 7 deletions dart/lib/src/sentry_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ abstract class SentryClient {
SentryClient.base(this._options, {String origin}) {
_random = _options.sampleRate == null ? null : Random();
if (_options.transport is NoOpTransport) {
try {
_options.transport = HttpTransport(options: _options, origin: origin);
} on ArgumentError catch (error) {
_options.logger(SentryLevel.error, '${error.message}');
} catch (err) {
_options.logger(SentryLevel.error, 'An exception occurred.');
}
_options.transport = HttpTransport(options: _options, origin: origin);
}
}

Expand Down