Code Monkey home page Code Monkey logo

Comments (6)

corebreaker avatar corebreaker commented on May 14, 2024

I can make a push request for that, it's easy.

from iris.

hiveminded avatar hiveminded commented on May 14, 2024

we can't get the reported configured neither in in Application nor in APIBuilder structure.

Yes we can, there is an exported function, app.GetReport() will return the errors as one, we don't give public access to/export the Reporter object itself because it's not used as one, it's combined with other error reporter inside the iris.Application#Build function, which is running on app.Run.

from iris.

corebreaker avatar corebreaker commented on May 14, 2024

So, how do you add an error from inside a Configurator to the caller of app.Run ?
In normal case, an error done in initialization procedure should be transmitted to return of a calling of app.Run.

But in general case, if i wanted making a middleware, i'd like have add an error as like app.Favicon() do it.

With app.GetReporter().AddErr(an_error), or context.Application().GetReporter().AddErr(an_error), it would be possible.

from iris.

hiveminded avatar hiveminded commented on May 14, 2024

Okay, I see your point, I thought that letting iris describes its own errors and your application its own by using a custom errors.Reporter and wrap the app.Build was a better way of doing these things. It's a small PR function without conflicts but I think users will overuse that and report strange issues, so I think it's "dangerous" to export that function. But as you wish, we've to wait for @kataras to review that and share his opinion with us. I am OK with that if helps you.

from iris.

corebreaker avatar corebreaker commented on May 14, 2024

Ok, i understand.

from iris.

kataras avatar kataras commented on May 14, 2024

Hello @hiveminded , @corebreaker Let's accept that, will help to reduce end-developer's code for reporting errors.

from iris.

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.