0190d20bd6
Change-Id: I0a37352c903bf7139af25aab255fe6a5331ce98b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194020 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
23 lines
734 B
Dart
23 lines
734 B
Dart
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'package:analyzer/instrumentation/service.dart';
|
|
|
|
/// Implementation of [InstrumentationService] that throws on [logException].
|
|
class TestInstrumentationService implements InstrumentationService {
|
|
@override
|
|
void logException(
|
|
Object exception, [
|
|
StackTrace? stackTrace,
|
|
List<InstrumentationServiceAttachment>? attachments,
|
|
]) {
|
|
throw StateError('$exception\n\n$stackTrace');
|
|
}
|
|
|
|
@override
|
|
dynamic noSuchMethod(Invocation invocation) {
|
|
return super.noSuchMethod(invocation);
|
|
}
|
|
}
|