Comments (6)
I can make a push request for that, it's easy.
from iris.
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.
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.
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.
Ok, i understand.
from iris.
Hello @hiveminded , @corebreaker Let's accept that, will help to reduce end-developer's code for reporting errors.
from iris.
Related Issues (20)
- [BUG] The cache entry has not been truly deleted after expiration HOT 5
- [BUG] Pluralization uses yml for template configuration, uses ctx.Tr method for rendering, returns no data HOT 1
- [BUG] HOT 3
- [BUG] may be an out-of-boundary bug as a result of lack of necessary argument checks HOT 1
- [BUG] Process hang HOT 1
- [FEATURE REQUEST] redis sentinel support
- [FEATURE REQUEST] Support log/slog HOT 4
- [QUESTION] iris v12.2.0 app.ContextPool.Attach not found HOT 1
- [HELP] How to dynamically start http services on multiple ports? HOT 1
- [HELP] How to proactively send websocket messages to the client in an MVC structure?
- [HELP] Multiple event when using native message
- Iris gRPC wrapper breaking HOT 1
- getBuiltinFuncs problem
- [BUG] template part Unable to load HOT 1
- [BUG] I used goroutine to affect the later HTTP before the service startup HOT 2
- [BUG] validation of binding is not effective
- [QUESTION] The session configuration provided by the iris framework is limited
- [FEATURE REQUEST] Get the data in the session through the session id
- [BUG] ctx.RemoveCookie need more special attribute(`domain` and `path`) value to remove cookies HOT 3
- slog is not in GOROOT HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iris.