feat: importexceptions#20
Conversation
WalkthroughThis pull request reorganizes exception class namespaces and refactors DNS zone file import error handling. Two existing exception classes (DecodingException and PartialDecodingException) are moved from Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (15)
🧰 Additional context used🧬 Code graph analysis (13)src/DNS/Server.php (2)
src/DNS/Message/Question.php (2)
src/DNS/Exception/Message/PartialDecodingException.php (1)
src/DNS/Message/Domain.php (2)
tests/unit/DNS/Message/HeaderTest.php (2)
src/DNS/Message/Record.php (2)
src/DNS/Exception/Message/DecodingException.php (1)
src/DNS/Message.php (2)
tests/unit/DNS/Message/DomainTest.php (2)
src/DNS/Message/Header.php (2)
src/DNS/Zone/File.php (3)
tests/unit/DNS/Zone/FileTest.php (2)
tests/unit/DNS/MessageTest.php (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (29)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| $type = self::parseType($typeString); | ||
| $type = Record::typeNameToCode($typeString); | ||
| if ($type === null) { | ||
| throw new InvalidArgumentException("Invalid record type '$typeString' (line $lineNum)."); |
There was a problem hiding this comment.
Intentional, or ImportException too?
There was a problem hiding this comment.
Intentional, it's within a static method that doesn't have the $content variable in scope.
We throw this exception and it's caught by a try catch in the import() method 👍
Summary by CodeRabbit
Bug Fixes
Refactoring