Thanks to visit codestin.com
Credit goes to github.com

Skip to content

React-Native crashed when try access err.stack #131

@ieow

Description

@ieow

React Native app crashed when try to access stack field in the error object

in reactNative ( version 0.72.0 )

to reproduce (in react native)

    import {rpcErrors} from '@metamask/rpc-errors';
    
    try {
      let err = rpcErrors.invalidRequest();
      console.log(err.stack);
    } catch (error) {
      console.log(error);
    }

Accessing stack in Error class works fine

   try {
     let err = new Error("error message");
     console.log(err.stack);
   } catch (error) {
     console.log(error);
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions