Giter Club home page Giter Club logo

Comments (15)

 avatar commented on June 3, 2024

Hello :-),

Yup, we should do that. We have a lot of possible ways to achieve that. Better ones I have in minds are: either a constant (that will act as a macro) or a static method in the core.

I have another question: does Symfony allow to disable its own exception and error handlers?

Thanks :-).

from core.

stephpy avatar stephpy commented on June 3, 2024

I don't know, but the exception/error handlers is only activated on symfony/debug (used in symfony/symfony), you can use all other libraries without having a new exception/error handler system.

from core.

 avatar commented on June 3, 2024

So, there is two “issues”: (i) toggle exception handler and (ii) toggle error to exception handler (note: this last respects the error_reporting parameter). What would be the default state? Enabled when Hoa is alone, else disabled? How to disable: with a constant (say define('HOA_CORE_EXCEPTION_HANDLER', false)) or with a static method: (say Hoa\Core\Exception::disableHandler())? I have a preference for the second one :-).

from core.

stephpy avatar stephpy commented on June 3, 2024

I prefer too the second one ;)

And, as i said in #15, i guess we should deactivate it by default, user will activate it if he want.

from core.

 avatar commented on June 3, 2024

I agree to add static methods to enable/disable error and exception handlers, but can we have a vote for the default values (/ping @osaris, @CircleCode, @camael24, @jubianchi, @shouze…)?

Moreover, do you have a patch to propose?

from core.

osaris avatar osaris commented on June 3, 2024

+1 for static methods to enable/disable

+1 for disabled by default because we need to make Hoa integration in other tools as smooth as possible if we want it to be widely adopted

from core.

stephpy avatar stephpy commented on June 3, 2024

+1 for @osaris :)

from core.

Hywan avatar Hywan commented on June 3, 2024

Ok, so what would be the name for those methods: enableErrorHandler(true | false) and enableExceptionHandler(true | false), on Hoa\Core?

from core.

stephpy avatar stephpy commented on June 3, 2024

Yep, that's a good naming to me.

from core.

Hywan avatar Hywan commented on June 3, 2024

Do I add these methods respectively on Hoa\Core\Exception and Hoa\Core\Exception\Error or on Hoa\Core (I propose Hoa\Core since this is an upstream operation: the core “enables” Hoa\Core\Exception\Error for example).

from core.

shouze avatar shouze commented on June 3, 2024

+1 for Hoa\Core

from core.

jubianchi avatar jubianchi commented on June 3, 2024

👍 for Hoa\Core

from core.

stephpy avatar stephpy commented on June 3, 2024

👍

from core.

Hywan avatar Hywan commented on June 3, 2024

Done: d3d90b3.
@stephpy: If you agree, please, close the issue :-).

from core.

stephpy avatar stephpy commented on June 3, 2024

You're awesome, thanks ;)

from core.

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.