OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 pub.exceptions; | 5 library pub.exceptions; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'dart:isolate'; | 8 import 'dart:isolate'; |
9 | 9 |
10 import "package:analyzer/analyzer.dart"; | 10 import "package:analyzer/analyzer.dart"; |
11 import 'package:args/command_runner.dart'; | 11 import 'package:args/command_runner.dart'; |
12 import "package:http/http.dart" as http; | 12 import "package:http/http.dart" as http; |
13 import "package:stack_trace/stack_trace.dart"; | 13 import "package:stack_trace/stack_trace.dart"; |
14 import "package:yaml/yaml.dart"; | 14 import "package:yaml/yaml.dart"; |
15 | 15 |
16 import '../../asset/dart/serialize.dart'; | 16 import 'asset/dart/serialize.dart'; |
17 | 17 |
18 /// An exception class for exceptions that are intended to be seen by the user. | 18 /// An exception class for exceptions that are intended to be seen by the user. |
19 /// | 19 /// |
20 /// These exceptions won't have any debugging information printed when they're | 20 /// These exceptions won't have any debugging information printed when they're |
21 /// thrown. | 21 /// thrown. |
22 class ApplicationException implements Exception { | 22 class ApplicationException implements Exception { |
23 final String message; | 23 final String message; |
24 | 24 |
25 ApplicationException(this.message); | 25 ApplicationException(this.message); |
26 | 26 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // fixed. | 110 // fixed. |
111 return error is ApplicationException || | 111 return error is ApplicationException || |
112 error is AnalyzerError || | 112 error is AnalyzerError || |
113 error is AnalyzerErrorGroup || | 113 error is AnalyzerErrorGroup || |
114 error is IsolateSpawnException || | 114 error is IsolateSpawnException || |
115 error is IOException || | 115 error is IOException || |
116 error is http.ClientException || | 116 error is http.ClientException || |
117 error is YamlException || | 117 error is YamlException || |
118 error is UsageException; | 118 error is UsageException; |
119 } | 119 } |
OLD | NEW |