Giter Club home page Giter Club logo

Comments (3)

moul avatar moul commented on September 25, 2024 1

I propose an hybrid approach:

  • Utilize #575's logging feature, which employs an unpersisted pubsub system for cost-effective contract logging. We can extend this feature to log supplementary information from the gnovm that is not directly written in the contract, such as advanced panic handling, debugging metrics, etc. Consequently, clients can subscribe to "logging events" for the current transaction ID and receive additional metadata.
  • Enhance error formatting to make it more informative and optionally typed, while maintaining conciseness for potential storage.

from gno.

moul avatar moul commented on September 25, 2024

Related with #439

from gno.

jefft0 avatar jefft0 commented on September 25, 2024

Hi @moul. I wonder if this is related to a question we have. In GnoMobile, if BroadcastTxCommit, returns an error in bres.CheckTx.Error, then it wraps a meaningful error type such as std.OutOfGasError. (Because the error is generated by the local checks before broadcasting?) We can check the error type. But if it returns an error in bres.DeliverTx.Error then it just wraps the generic abci.StringError. (Because only an error string is returned from the validator?)

For example when we try to register a user without enough "send", it returns the string "payment must not be less than 200000000". In GnoMobile, we would like to return an error code, but it is not ideal to have to match an error message string. (This example is realm-specific, but even language-level errors like nil pointer are just returned as strings.) I ask this question in this issue because maybe the validator can return a meaningful error type. Are there plans for that?

from gno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.