| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /// Generic utility functions. Stuff that should possibly be in core. | 5 /// Generic utility functions. Stuff that should possibly be in core. |
| 6 library pub.utils; | 6 library pub.utils; |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'dart:isolate'; | 10 import 'dart:isolate'; |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 /// Returns whether [error] is a user-facing error object. This includes both | 496 /// Returns whether [error] is a user-facing error object. This includes both |
| 497 /// [ApplicationException] and any dart:io errors. | 497 /// [ApplicationException] and any dart:io errors. |
| 498 bool isUserFacingException(error) { | 498 bool isUserFacingException(error) { |
| 499 return error is ApplicationException || | 499 return error is ApplicationException || |
| 500 // TODO(nweiz): clean up this branch when issue 9955 is fixed. | 500 // TODO(nweiz): clean up this branch when issue 9955 is fixed. |
| 501 error is DirectoryException || | 501 error is DirectoryException || |
| 502 error is FileException || | 502 error is FileException || |
| 503 error is HttpException || | 503 error is HttpException || |
| 504 error is HttpException || | 504 error is HttpException || |
| 505 error is LinkException || | 505 error is LinkException || |
| 506 error is MimeMultipartException || | |
| 507 error is OSError || | 506 error is OSError || |
| 508 error is ProcessException || | 507 error is ProcessException || |
| 509 error is SocketException || | 508 error is SocketException || |
| 510 error is WebSocketException; | 509 error is WebSocketException; |
| 511 } | 510 } |
| OLD | NEW |