Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Future can't be completed with null exception #1920

Closed
DartBot opened this issue Feb 29, 2012 · 3 comments
Closed

Future can't be completed with null exception #1920

DartBot opened this issue Feb 29, 2012 · 3 comments
Assignees
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).

Comments

@DartBot
Copy link

DartBot commented Feb 29, 2012

This issue was originally filed by [email protected]


What steps will reproduce the problem?
Run the following test:

main() {
  var completer = new Completer();
  var future = completer.future;
  completer.completeException(null);
  print(future.exception);
}

What is the expected output? What do you see instead?
Documentation does not prohibit from passing null, so expected output is 'null'.
Actual: IllegalArgumentException is thrown.

What version of the product are you using? On what operating system?
DartVM, Frog r4736. OS Ubuntu 10.04.

Please provide any additional information below.

@kasperl
Copy link

kasperl commented Feb 29, 2012

Set owner to @sigmundch.
Added Area-Language, Triaged labels.

@sigmundch
Copy link
Member

I'll update the documentation to keep the current semantics (IllegalArgumentException).


Added Accepted label.

@sigmundch
Copy link
Member

Added Fixed label.

@DartBot DartBot added Type-Defect area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language). labels Feb 29, 2012
copybara-service bot pushed a commit that referenced this issue Jan 31, 2023
…g, mockito, package_config, shelf, string_scanner, test, webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

async (https://github.com/dart-lang/async/compare/f700e9a..f700e9a):
  f700e9a  2023-01-27  Devon Carew  blast_repo fixes (#231)

characters (https://github.com/dart-lang/characters/compare/4526aa8..4526aa8):
  4526aa8  2023-01-30  Lasse R.H. Nielsen  Update tables to Unicode 15.0. (#71)

collection (https://github.com/dart-lang/collection/compare/a566328..a566328):
  a566328  2023-01-26  Devon Carew  add a publish script; prep to publish (#267)

dartdoc (https://github.com/dart-lang/dartdoc/compare/bc7bdc4..bc7bdc4):
  bc7bdc44  2023-01-30  dependabot[bot]  Bump js from 0.6.5 to 0.6.7 (#3310)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/e73c4ad..e73c4ad):
  e73c4ad  2023-01-26  Devon Carew  blast_repo fixes (#89)

logging (https://github.com/dart-lang/logging/compare/399100a..399100a):
  399100a  2023-01-26  Devon Carew  add a publish script; prep to publish 1.1.1 (#128)

mockito (https://github.com/dart-lang/mockito/compare/d2a8df1..d2a8df1):
  d2a8df1  2023-01-30  Kevin Moore  Latest build_web_compilers, move to pkg:lints, fix breaks (#605)
  13340b5  2023-01-30  dependabot[bot]  Bump dart-lang/setup-dart from 1.3 to 1.4 (#600)

package_config (https://github.com/dart-lang/package_config/compare/3fe81c4..3fe81c4):
  3fe81c4  2023-01-30  Kevin Moore  Support latest pkg:build_web_compilers, lints. Update min SDK (#129)

shelf (https://github.com/dart-lang/shelf/compare/8fca9d9..8fca9d9):
  8fca9d9  2023-01-26  Devon Carew  blast_repo fixes (#326)

string_scanner (https://github.com/dart-lang/string_scanner/compare/29e471e..29e471e):
  29e471e  2023-01-30  dependabot[bot]  Bump dart-lang/setup-dart from 1.3 to 1.4 (#53)

test (https://github.com/dart-lang/test/compare/cec47c1..cec47c1):
  cec47c1c  2023-01-27  Nate Bosch  Add missing pub requirements (#1878)
  c99d455e  2023-01-27  Nate Bosch  Prepare to publish (#1877)
  0e7ec6a7  2023-01-27  Nate Bosch  Rename `Check` to `Subject` (#1875)
  78382731  2023-01-27  Nate Bosch  Add String.matches condition (#1874)
  26e0e87b  2023-01-27  Nate Bosch  Add Iterable.containsInOrder condition (#1873)
  c9232d6b  2023-01-27  Nate Bosch  Rename `that` to `which` (#1872)
  457166b3  2023-01-26  Nate Bosch  Add missing dependency on package:lints (#1876)
  193f2a0b  2023-01-26  Nate Bosch  Retry instead of extend timeout for flaky Node tests (#1871)
  7ad9b2c3  2023-01-26  Nate Bosch  Overhaul async matchers (#1868)
  ca254546  2023-01-26  Nate Bosch  Add a withQueue utility (#1870)
  6ae2e5e9  2023-01-26  Nate Bosch  Refactor tests to a new isRejectedBy utility (#1867)
  5aeba66d  2023-01-26  Nate Bosch  Use pubspec_overrides.yaml files (#1869)

webdev (https://github.com/dart-lang/webdev/compare/ce9c581..ce9c581):
  ce9c581  2023-01-29  Anna Gringauze  Validate only needed summaries in expression_compiler_service (#1920)

Change-Id: I3ddb0ddeb3b989f6f9e78cd8aa6327aba5899018
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280078
Commit-Queue: Devon Carew <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
copybara-service bot pushed a commit that referenced this issue Feb 13, 2023
…, http_parser, pub_semver, shelf, term_glyph, test, typed_data, webdev

Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/bd3ac85..b08471e):
  b08471e  2023-02-09  Sigurd Meldgaard  Suggest command based on aliases (#235)

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/1124692..53871c5):
  53871c5  2023-02-09  Kevin Moore  Migrate to dart_flutter_team_lints, cleanup (#69)

benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/b1efcf7..a6a0891):
  a6a0891  2023-02-09  Kevin Moore  Require Dart 2.19, update lints to dart_flutter_team_lints (#84)

dartdoc (https://github.com/dart-lang/dartdoc/compare/494a6be..3931595):
  39315954  2023-02-13  Devon Carew  enable additional lints (#3336)
  a52639e7  2023-02-10  Sam Rawlins  Use markdown 7 (#3332)

glob (https://github.com/dart-lang/glob/compare/a828420..f378dc8):
  f378dc8  2023-02-13  Kevin Moore  Update to dart_flutter_team_lints, also cleaned up markdown (#71)

http (https://github.com/dart-lang/http/compare/8386923..f4b365e):
  f4b365e  2023-02-07  Sigurd Meldgaard  Remove dependency on package:path (#865)

http_parser (https://github.com/dart-lang/http_parser/compare/1c0c17a..b3b283b):
  b3b283b  2023-02-08  Kevin Moore  Bump min SDK to 2.17 (#69)

pub_semver (https://github.com/dart-lang/pub_semver/compare/e9c600c..c0e6ea7):
  c0e6ea7  2023-02-12  Devon Carew  Update CHANGELOG.md (#81)
  0d62000  2023-02-12  Kevin Moore  Fix new type error, use dart_flutter_team_lints (#80)

shelf (https://github.com/dart-lang/shelf/compare/9d1fb8a..707c8b2):
  707c8b2  2023-02-07  Kevin Moore  move to pkg:dart_flutter_team_lints (#330)

term_glyph (https://github.com/dart-lang/term_glyph/compare/520784d..d275a8f):
  d275a8f  2023-02-12  Kevin Moore  Fix CI, update lints (#34)

test (https://github.com/dart-lang/test/compare/da7c667..b5e70db):
  b5e70db5  2023-02-10  Jacob MacDonald  Add notes about versioning and publishing to CONTRIBUTING.md (#1929)
  2773daa6  2023-02-09  Jacob MacDonald  update changelog version in test to use ## (#1926)
  9e3072e1  2023-02-09  Danny Tuppeny  Handle absolute paths on Windows (#1923)
  07380027  2023-02-09  Nicholas Shahan  Fix typo in migration doc (#1924)
  f49fc16a  2023-02-09  Kevin Moore  Add auto-publish configuration (#1922)
  5bf28959  2023-02-08  Nate Bosch  Add link to file issue on README (#1921)
  ef81f471  2023-02-08  Nate Bosch  Fix directory name for issue templates (#1920)
  f3bfda9d  2023-02-08  Nate Bosch  Add issue templates (#1919)
  a80f4fd0  2023-02-08  Devon Carew  Refactor top level and package README files (#1918)
  0f4558fe  2023-02-07  Nate Bosch  Prepare to publish test_core and test (#1917)
  39f498c8  2023-02-06  Nate Bosch  Minor readme improvements (#1913)
  2cb07a3f  2023-02-06  Nate Bosch  Rename matches to matchesPattern, accept Pattern (#1907)
  ba6fb1c9  2023-02-06  Jacob MacDonald  Support running tests by absolute file: uri (#1893)
  ffeaec66  2023-02-06  Nate Bosch  Take Condition for async nesting expectations (#1896)
  cdd8c395  2023-02-06  Daniel Chevalier  update vm_service to support 11.0.0 (#1910)
  f2d97bf2  2023-02-06  Nate Bosch  Expand the doc comment for Context (#1902)

typed_data (https://github.com/dart-lang/typed_data/compare/6fbbd95..f858046):
  f858046  2023-02-12  Kevin Moore  fix ci, update analysis options (#61)

webdev (https://github.com/dart-lang/webdev/compare/6255c85..0bae2be):
  0bae2be  2023-02-10  Elliott Brooks (she/her)  Fix lifeline connection logic (#1952)
  4a41cf9  2023-02-10  Anna Gringauze  Support records (#1919)
  d6229e3  2023-02-09  Anna Gringauze  Fix failure on getting a list with out of range offset (#1947)
  f1b15e8  2023-02-09  Anna Gringauze  Fix incorrect list element count (#1944)
  fff4865  2023-02-09  Elliott Brooks (she/her)  Add missing IDs to inspector panel (#1946)
  47287e3  2023-02-08  Elliott Brooks (she/her)  [MV3 Debug Extension] Extension sets the `ide` query parameter for the DevTools URI (#1943)
  1136d51  2023-02-08  Elliott Brooks (she/her)  Catch exceptions in unawaited `Futures` (#1938)
  2cad786  2023-02-07  Anna Gringauze  Cleanup getObject logic for handling offsets and counts (#1936)
  b399e94  2023-02-06  Elliott Brooks (she/her)  Pull out `dart:io`-dependent functions from`/src/utilities/shared.dart` into
`/src/utilities/server.dart` (#1942)

Change-Id: I64bdc5485665ca4c13a331ae7a6c77b1cd3208d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282802
Commit-Queue: Devon Carew <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-language Dart language related items (some items might be better tracked at github.com/dart-lang/language).
Projects
None yet
Development

No branches or pull requests

3 participants