EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 463 forks source link

how to get the eosjs error ??? #161

Closed healthwallet closed 6 years ago

healthwallet commented 6 years ago
   try {
      this.$gobal.eos.transaction("liontoken",con=>{
        con.transfer("liontoken","eosio","10 LON","transfer")

      }).then(function (value){
        console.log(value);
        return value;
      });
    }
    catch (e) {
      console.log(e);
    }

Error: {"code":500,"message":"Internal Service Error","error":{"code":3060002,"name":"account_query_exception","what":"Account Query Exception","details":[{"message":"Fail to retrieve account for eosio.token","file":"chain_plugin.cpp","line_number":561,"method":"get_abi"}]}} at eval (webpack-internal:///./node_modules/eosjs-api/lib/apigen.js:115:23) (anonymous function)
callback
(anonymous function)
Uncaught (in promise) Error: {"code":500,"message":"Internal Service Error","error":{"code":3060002,"name":"account_query_exception","what":"Account Query Exception","details":[{"message":"Fail to retrieve account for eosio.token","file":"chain_plugin.cpp","line_number":561,"method":"get_abi"}]}} (anonymous function)

# console output error,how to get the error in program,the catch and value can't get???

MrToph commented 6 years ago

I would also like to know this. I'm using async/await. Did you figure it out?

jcalfee commented 6 years ago
this.$gobal.eos.transaction("liontoken",con=>{
        con.transfer("liontoken","eosio","10 LON","transfer")

      }).then(function (value){
        console.log(value);
        return value;
      }).catch(function (e) {
      console.log(e);
    })