This commit is contained in:
hamid zarghami
2025-04-17 11:38:39 +03:30
parent 01470f14d6
commit cdc611a65d
2 changed files with 0 additions and 30 deletions
-12
View File
@@ -1,12 +0,0 @@
export default function TestServerErrorPage() {
// ایجاد خطا در سمت سرور
throw new Error('این یک خطای سمت سرور آزمایشی است')
// این بخش هرگز اجرا نمی‌شود
return (
<div>
<h1>صفحه تست خطای سرور</h1>
<p>اگر این متن را میبینید، خطا رخ نداده است!</p>
</div>
)
}
-18
View File
@@ -1,18 +0,0 @@
'use client'
import { useEffect } from 'react'
export default function TestErrorPage() {
useEffect(() => {
// این کد عمداً خطا ایجاد می‌کند
throw new Error('این یک خطای آزمایشی برای نمایش صفحه error است')
}, [])
// این بخش هرگز نمایش داده نمی‌شود چون قبل از آن خطا رخ می‌دهد
return (
<div>
<h1>صفحه تست خطا</h1>
<p>اگر این متن را میبینید، خطا رخ نداده است!</p>
</div>
)
}