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/bg/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/bg/web/javascript/reference/errors')
| -rw-r--r-- | files/bg/web/javascript/reference/errors/index.html | 31 | ||||
| -rw-r--r-- | files/bg/web/javascript/reference/errors/unexpected_type/index.html | 70 |
2 files changed, 0 insertions, 101 deletions
diff --git a/files/bg/web/javascript/reference/errors/index.html b/files/bg/web/javascript/reference/errors/index.html deleted file mode 100644 index c295fccea6..0000000000 --- a/files/bg/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/bg/web/javascript/reference/errors/unexpected_type/index.html b/files/bg/web/javascript/reference/errors/unexpected_type/index.html deleted file mode 100644 index 372560f00e..0000000000 --- a/files/bg/web/javascript/reference/errors/unexpected_type/index.html +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: 'TypeError: "x" is (not) "y"' -slug: Web/JavaScript/Reference/Errors/Unexpected_type -tags: - - JavaScript - - TypeError - - Грешки -translation_of: Web/JavaScript/Reference/Errors/Unexpected_type ---- -<div>{{jsSidebar("Errors")}}</div> - -<h2 id="Съобщение">Съобщение</h2> - -<pre class="syntaxbox">TypeError: "x" is (not) "y" - -Примери: -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="Какво_се_обърка"><span class="short_text" id="result_box" lang="bg"><span>Какво се обърка?</span></span></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">// Случаи, при които методът substring няма да работи. -// Такива са undefined и null. -var foo = undefined; -foo.substring(1); // TypeError: foo is undefined - -var foo = null; -foo.substring(1); // TypeError: foo is null - - -// Методи, които очакват да бъдат извикани -// върху точно определен тип. -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 id="Поправяне_на_грешката">Поправяне на грешката</h3> - -<p>За да оправите грешката в случай на указател, сочещ към стойност <code>undefined</code> или <code>null</code>, можете да използвате оператора <a href="/en-US/docs/Web/JavaScript/Reference/Operators/typeof">typeof</a>.</p> - -<pre class="brush: js">if (typeof foo !== 'undefined') { - // Сега знаем, че foo има определена стойност - // и можем да продължим. -}</pre> - -<h2 id="Вижте_също">Вижте също</h2> - -<ul> - <li>{{jsxref("undefined")}}</li> - <li>{{jsxref("null")}}</li> -</ul> |
