diff options
| author | Ryan Johnson <rjohnson@mozilla.com> | 2021-04-29 16:16:42 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-29 16:16:42 -0700 |
| commit | 95aca4b4d8fa62815d4bd412fff1a364f842814a (patch) | |
| tree | 5e57661720fe9058d5c7db637e764800b50f9060 /files/ar/web/javascript/reference/errors | |
| parent | ee3b1c87e3c8e72ca130943eed260ad642246581 (diff) | |
| download | translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.gz translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.tar.bz2 translated-content-95aca4b4d8fa62815d4bd412fff1a364f842814a.zip | |
remove retired locales (#699)
Diffstat (limited to 'files/ar/web/javascript/reference/errors')
| -rw-r--r-- | files/ar/web/javascript/reference/errors/index.html | 31 | ||||
| -rw-r--r-- | files/ar/web/javascript/reference/errors/unexpected_type/index.html | 68 |
2 files changed, 0 insertions, 99 deletions
diff --git a/files/ar/web/javascript/reference/errors/index.html b/files/ar/web/javascript/reference/errors/index.html deleted file mode 100644 index c295fccea6..0000000000 --- a/files/ar/web/javascript/reference/errors/index.html +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: JavaScript error reference -slug: Web/JavaScript/Reference/Errors -tags: - - Debugging - - Error - - Errors - - Exception - - JavaScript - - NeedsTranslation - - TopicStub - - exceptions -translation_of: Web/JavaScript/Reference/Errors ---- -<p>{{jsSidebar("Errors")}}</p> - -<p>Below, you'll find a list of errors which are thrown by JavaScript. These errors can be a helpful debugging aid, but the reported problem isn't always immediately clear. The pages below will provide additional details about these errors. Each error is an object based upon the {{jsxref("Error")}} object, and has a <code>name</code> and a <code>message</code>.</p> - -<p>Errors displayed in the Web console may include a link to the corresponding page below to help you quickly comprehend the problem in your code.</p> - -<h2 id="List_of_errors">List of errors</h2> - -<p>In this list, each page is listed by name (the type of error) and message (a more detailed human-readable error message). Together, these two properties provide a starting point toward understanding and resolving the error. For more information, follow the links below!</p> - -<p>{{ListSubPages("/en-US/docs/Web/JavaScript/Reference/Errors")}}</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Learn/JavaScript/First_steps/What_went_wrong">What went wrong? Troubleshooting JavaScript</a>: Beginner's introductory tutorial on fixing JavaScript errors.</li> -</ul> diff --git a/files/ar/web/javascript/reference/errors/unexpected_type/index.html b/files/ar/web/javascript/reference/errors/unexpected_type/index.html deleted file mode 100644 index 085dc8a167..0000000000 --- a/files/ar/web/javascript/reference/errors/unexpected_type/index.html +++ /dev/null @@ -1,68 +0,0 @@ ---- -title: 'TypeError: "x" is (not) "y"' -slug: Web/JavaScript/Reference/Errors/Unexpected_type -tags: - - الأخطاء - - جافاسكربت - - نوع الخطأ -translation_of: Web/JavaScript/Reference/Errors/Unexpected_type ---- -<div>{{jsSidebar("Errors")}}</div> - -<h2 id="الرسالة">الرسالة</h2> - -<pre class="syntaxbox">TypeError: Unable to get property {x} of undefined or null reference (Edge) -TypeError: "x" is (not) "y" (Firefox) - -Examples: -TypeError: "x" is undefined -TypeError: "x" is null -TypeError: "undefined" is not an object -TypeError: "x" is not an object or null -TypeError: "x" is not a symbol -</pre> - -<h2 id="نوع_الخطأ">نوع الخطأ</h2> - -<p>{{jsxref("TypeError")}}.</p> - -<h2 id="ماذا_حصل؟"> ماذا حصل؟</h2> - -<p>خطأ غير متوقع، يحدث كثيرا مع {{jsxref("undefined")}} أو قيم {{jsxref("null")}} .</p> - -<p>أيضا في بعض الوضائف مثل {{jsxref("Object.create()")}} أو {{jsxref("Symbol.keyFor()")}}, تحتاج تقديد أنواع محددة.</p> - -<h2 id="أمثلة">أمثلة</h2> - -<h3 id="حالات_غير_صحيحة">حالات غير صحيحة</h3> - -<pre class="brush: js example-bad">// undefined and null cases on which the substring method won't work -var foo = undefined; -foo.substring(1); // TypeError: foo is undefined - -var foo = null; -foo.substring(1); // TypeError: foo is null - - -// Certain methods might require a specific type -var foo = {} -Symbol.keyFor(foo); // TypeError: foo is not a symbol - -var foo = 'bar' -Object.create(foo); // TypeError: "foo" is not an object or null -</pre> - -<h3 class="highlight-spanned" id="حل_المشكلة"><span class="highlight-span"><span class="notranslate">حل المشكلة</span> </span></h3> - -<p><span class="notranslate">لإصلاح مؤشر null إلى قيم <code>undefined</code> أو <code>null</code> ، يمكنك استخدام عامل التشغيل <a href="https://translate.googleusercontent.com/translate_c?act=url&depth=1&hl=ar&ie=UTF8&prev=_t&rurl=translate.google.com&sl=auto&sp=nmt4&tl=ar&u=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof&xid=17259,1500002,15700002,15700021,15700124,15700149,15700186,15700190,15700201,15700214&usg=ALkJrhh23enjQBtOCeYxpsucdSXvqqK0dg">typeof</a> ، على سبيل المثال.</span></p> - -<pre class="brush: js">if (typeof foo !== 'undefined') { - // الآن نعلم أن القيمة المدخلة غير محددة، نستطيع القيام بأي إجراء بدون خطأ. -}</pre> - -<h2 id="شاهد_أيضاً">شاهد أيضاً</h2> - -<ul> - <li>{{jsxref("undefined")}}</li> - <li>{{jsxref("null")}}</li> -</ul> |
