intel / intel/rohd

Make `LogicValue` `toInt`, `toBigInt`, etc. return `null` when signal is invalid instead of an Exception

Open
#128 3 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Dart
Stars
489
Forks
88
Avg merge
3d 23h
Merged PRs (30d)
10

Description

## Motivation
Dealing with null is easier with Dart's null safety than an exception.

## Desired solution
Functions that might not have a valid int/BigInt representation due to invalid signal values (x/z) should return `int?` and `BigInt?` instead of throwing an exception when it is invalid.

## Alternatives considered
Leave as it is with exceptions thrown when invalid.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.