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

handle exception when SVGParser::fromString called #2

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

priyashantha
Copy link
Contributor

No description provided.

Copy link
Member

@erikfrerejean erikfrerejean left a comment

Choose a reason for hiding this comment

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

Hi @priyashantha,

Thanks for the contribution. I'd like to have these exceptions logged, would be a waste to just have the exception disappear at this point.

$this->svg = SVGParser::fromString($this->File->getString());
try {
$this->svg = SVGParser::fromString($this->File->getString());
} catch (\Exception $e) {}
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a logger on the exception? If this fails it would be valuable to have the fail reason logged.

@erikfrerejean erikfrerejean added the bug Something isn't working label Mar 11, 2024
@erikfrerejean erikfrerejean merged commit 12efe10 into wedevelopnl:main Mar 25, 2024
@erikfrerejean
Copy link
Member

@priyashantha I've added logging and merged into main. Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants