OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library unittest.runner.load_exception; | 5 library test.runner.load_exception; |
6 | 6 |
7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
8 | 8 |
9 import 'package:path/path.dart' as p; | 9 import 'package:path/path.dart' as p; |
10 import 'package:source_span/source_span.dart'; | 10 import 'package:source_span/source_span.dart'; |
11 | 11 |
12 import '../utils.dart'; | 12 import '../utils.dart'; |
13 | 13 |
14 class LoadException implements Exception { | 14 class LoadException implements Exception { |
15 final String path; | 15 final String path; |
(...skipping 24 matching lines...) Expand all Loading... |
40 } if (innerError is SourceSpanException) { | 40 } if (innerError is SourceSpanException) { |
41 innerString = innerError.toString(color: color) | 41 innerString = innerError.toString(color: color) |
42 .replaceFirst(" of $path", ""); | 42 .replaceFirst(" of $path", ""); |
43 } | 43 } |
44 | 44 |
45 buffer.write(innerString.contains("\n") ? "\n" : " "); | 45 buffer.write(innerString.contains("\n") ? "\n" : " "); |
46 buffer.write(innerString); | 46 buffer.write(innerString); |
47 return buffer.toString(); | 47 return buffer.toString(); |
48 } | 48 } |
49 } | 49 } |
OLD | NEW |