Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in PackageTimeoutException and translate docs into English #130

Merged
merged 4 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class AnalyzePackagesUseCase {
.timeout(
packageTimeout,
onTimeout: () =>
throw PackageTimoutException(packageTimeout, package),
throw PackageTimeoutException(packageTimeout, package),
)
.then((_) => _statusUpdater.success())
.catchError((e, s) => _statusUpdater.failure(error: e, stackTrace: s))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class GetPackagesUseCase {
.timeout(
packageTimeout,
onTimeout: () =>
throw PackageTimoutException(packageTimeout, package),
throw PackageTimeoutException(packageTimeout, package),
)
.then((_) => _statusUpdater.success())
.catchError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@

import 'package.dart';

/// [package] hat länger als [packageTimeout] gebraucht, um eine Aktion
/// (z.B. flutter test) auszuführen.
class PackageTimoutException implements Exception {
/// Exception thrown when [package] executed longer than [packageTimeout] for an
/// action like "flutter test".
class PackageTimeoutException implements Exception {
final Duration packageTimeout;
final Package package;

PackageTimoutException(
PackageTimeoutException(
this.packageTimeout,
this.package,
);

@override
String toString() {
return 'Das Package "${package.name}" [${package.type.toReadableString()}] hat den Package-Timeout von ${packageTimeout.inMinutes} Minuten überschritten.';
return 'The package "${package.name}" [${package.type.toReadableString()}] passed the timeout of ${packageTimeout.inMinutes} minutes.';
nilsreichardt marked this conversation as resolved.
Show resolved Hide resolved
}
}