Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(554)

Side by Side Diff: lib/src/runner/load_exception.dart

Issue 955543002: Move a bunch of src/ files into subdirectories. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Fix library tags Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/src/runner/isolate_test.dart ('k') | lib/src/runner/loader.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.load_exception; 5 library unittest.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 10
11 import 'utils.dart'; 11 import '../utils.dart';
12 12
13 class LoadException implements Exception { 13 class LoadException implements Exception {
14 final String path; 14 final String path;
15 15
16 final innerError; 16 final innerError;
17 17
18 LoadException(this.path, this.innerError); 18 LoadException(this.path, this.innerError);
19 19
20 String toString() { 20 String toString() {
21 var buffer = new StringBuffer('Failed to load "$path":'); 21 var buffer = new StringBuffer('Failed to load "$path":');
(...skipping 11 matching lines...) Expand all
33 "Uncaught Error: Load Error: FileSystemException: ", 33 "Uncaught Error: Load Error: FileSystemException: ",
34 ""); 34 "");
35 innerString = innerString.split("Stack Trace:\n").first.trim(); 35 innerString = innerString.split("Stack Trace:\n").first.trim();
36 } 36 }
37 37
38 buffer.write(innerString.contains("\n") ? "\n" : " "); 38 buffer.write(innerString.contains("\n") ? "\n" : " ");
39 buffer.write(innerString); 39 buffer.write(innerString);
40 return buffer.toString(); 40 return buffer.toString();
41 } 41 }
42 } 42 }
OLDNEW
« no previous file with comments | « lib/src/runner/isolate_test.dart ('k') | lib/src/runner/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698