mirror of
https://github.com/manualdousuario/marreta.git
synced 2026-04-30 12:30:23 +00:00
add dmca domains block
This commit is contained in:
parent
01237362c5
commit
22e836b707
12 changed files with 103 additions and 10 deletions
|
|
@ -14,10 +14,17 @@ class URLAnalyzerError extends URLAnalyzerBase
|
|||
public function throwError($errorType, $additionalInfo = '')
|
||||
{
|
||||
$errorConfig = $this->errorMap[$errorType];
|
||||
$message = Language::getMessage($errorConfig['message_key'])['message'];
|
||||
if ($additionalInfo) {
|
||||
$message .= ': ' . $additionalInfo;
|
||||
|
||||
// For DMCA domains, use custom message if provided, otherwise use default
|
||||
if ($errorType === self::ERROR_DMCA_DOMAIN && !empty($additionalInfo)) {
|
||||
$message = $additionalInfo;
|
||||
} else {
|
||||
$message = Language::getMessage($errorConfig['message_key'])['message'];
|
||||
if ($additionalInfo && $errorType !== self::ERROR_DMCA_DOMAIN) {
|
||||
$message .= ': ' . $additionalInfo;
|
||||
}
|
||||
}
|
||||
|
||||
throw new URLAnalyzerException($message, $errorConfig['code'], $errorType, $additionalInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue