Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Koowa::isDebug check for debugging #535

Merged
merged 4 commits into from
Sep 9, 2021
Merged

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Sep 9, 2021

Closes #534

  • When Koowa::isDebug is true (KOOWA_DEBUG environment variable is set) catch everything
  • When Joomla debug is on catch errors and all uncaught exceptions
  • Otherwise, do nothing
  1. Koowa debug enabled (by setting the KOOWA_DEBUG environment variable)
  • If KOOWA_DEBUG is enabled assume we are in local development mode
    • error types : TYPE_ALL which will trigger an exception for : exceptions, errors and failures
    • error levels : ERROR_DEVELOPMENT (E_ALL | E_STRICT | ~E_DEPRECATED)
  1. Joomla debug enabled
  • If debug is enabled assume we are in none local debug mode
    • error types : TYPE_ALL which will trigger an exception for : exceptions, errors and failures
    • error levels : E_ERROR and E_PARSE
  1. Debug disabled
  • Do not try to trigger errors or exceptions automatically. To trigger an exception the implementing code
  • should call {@link handleException()}

When Koowa::isDebug is true (KOOWA_DEBUG environment variable is set) catch everything
When Joomla debug is on catch errors and all uncaught exceptions
Otherwise, do nothing
@github-actions github-actions bot added this to the 3.5 milestone Sep 9, 2021
Copy link
Member

@johanjanssens johanjanssens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@ercanozkaya ercanozkaya merged commit e4e74d2 into master Sep 9, 2021
@ercanozkaya ercanozkaya deleted the feature/534-debug branch September 9, 2021 12:32
@amazeika amazeika modified the milestones: 3.5, v3.5.7 Nov 15, 2021
@johanjanssens johanjanssens modified the milestones: 3.5, v3.5.7 Nov 15, 2021
amazeika added a commit that referenced this pull request Dec 7, 2021
amazeika added a commit that referenced this pull request Dec 7, 2021
Contrarely to Joomla 3, Joomla 4 supports event subscribers for error handling. Instead of rendering the error ourselves, we may just leave it be and let Joomla handle it last.
@johanjanssens johanjanssens changed the title Use KOOWA_DEBUG environment variable for debugging Use Koowa::isDebug check for debugging Dec 10, 2021
This was referenced Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Koowa::isDebug check for debugging
3 participants