Skip to content
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 opened this issue Sep 1, 2017 · 0 comments
Closed
Assignees
Milestone

Comments

@pinepain
Copy link
Member

pinepain commented Sep 1, 2017

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.

@pinepain pinepain added this to the 0.2.0 milestone Sep 1, 2017
@pinepain pinepain changed the title Remove Message constants and use NULL values instead Remove Message constants and use NULL values instead Sep 1, 2017
@pinepain pinepain changed the title Remove Message constants and use NULL values instead Remove constants that denotes no data and use NULL values instead Sep 2, 2017
@pinepain pinepain self-assigned this Sep 6, 2017
pinepain added a commit that referenced this issue Oct 3, 2017
pinepain added a commit that referenced this issue Oct 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant