Files
sdk/pkg/analysis_server/test/utils/test_instrumentation_service.dart
T
Brian Wilkerson 0190d20bd6 Migrate some tests and test utilities in server
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>
2021-04-03 19:23:44 +00:00

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);
}
}