Skip to content
This repository was archived by the owner on Mar 29, 2024. It is now read-only.
This repository was archived by the owner on Mar 29, 2024. It is now read-only.

Remove constants that denotes no data and use NULL values instead #40

Closed
@pinepain

Description

@pinepain
class Message {
    const kNoLineNumberInfo = 0;
    const kNoColumnInfo = 0;
    const kNoScriptIdInfo = 0;
...

class UnboundScript {
    const kNoScriptId = 0;
...

As 0 value is ambiguous as vast majority users without strong v8 internals background would be surprised that 0 is not a zero line number, but no info available.

We can safely return/use null to explicitly denote that no info available.

Note, UnboundScript, StackFrame and ScriptOrigin are also affected with this issue, maybe some other too.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions