aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJongha Kim <kim.jongha@gmail.com>2021-07-16 12:24:44 +0900
committerGitHub <noreply@github.com>2021-07-16 12:24:44 +0900
commit2af84fbd2687face6b825aa7544de3d5f5be9fd8 (patch)
treebb54a2b0f2538c29af9ae2927433b88efdc5d8a2
parent95be06629101948c38dd82fd494028ea4aaa3094 (diff)
downloadtranslated-content-2af84fbd2687face6b825aa7544de3d5f5be9fd8.tar.gz
translated-content-2af84fbd2687face6b825aa7544de3d5f5be9fd8.tar.bz2
translated-content-2af84fbd2687face6b825aa7544de3d5f5be9fd8.zip
Javascript/URIError 추가 외 (#1362)
- Javascript/URIError, URIError 생성자 추가 - typeerror 약간 수정
-rw-r--r--files/ko/web/javascript/reference/global_objects/typeerror/index.html25
-rw-r--r--files/ko/web/javascript/reference/global_objects/urierror/index.html90
-rw-r--r--files/ko/web/javascript/reference/global_objects/urierror/urierror/index.html83
3 files changed, 184 insertions, 14 deletions
diff --git a/files/ko/web/javascript/reference/global_objects/typeerror/index.html b/files/ko/web/javascript/reference/global_objects/typeerror/index.html
index b9904b00eb..1b80b115f6 100644
--- a/files/ko/web/javascript/reference/global_objects/typeerror/index.html
+++ b/files/ko/web/javascript/reference/global_objects/typeerror/index.html
@@ -13,9 +13,7 @@ browser-compat: javascript.builtins.TypeError
<div>{{JSRef}}</div>
<p>
- <code><strong>TypeError</strong></code
- > 객체는 일반적으로 값이 기대하던 자료형이 아니라서 연산을 할 수 없을 때
- 발생하는 오류입니다.
+ <code><strong>TypeError</strong></code> 객체는 일반적으로 값이 기대하던 자료형이 아니라서 연산을 할 수 없을 때 발생하는 오류입니다.
</p>
<p>다음과 같은 경우 <code>TypeError</code>가 발생할 수 있습니다.</p>
@@ -29,20 +27,20 @@ browser-compat: javascript.builtins.TypeError
<li>부적절한 방법으로 값을 사용하려고 할 때.</li>
</ul>
-<h2 id="생성자">생성자</h2>
+<h2 id="Constructor">생성자</h2>
<dl>
<dt>{{jsxref("Global_Objects/TypeError/TypeError", "TypeError()")}}</dt>
<dd>새로운 <code>TypeError</code> 객체를 생성합니다.</dd>
</dl>
-<h2 id="인스턴스_속성">인스턴스_속성</h2>
+<h2 id="Instance_properties">인스턴스 속성</h2>
<dl>
<dt>{{jsxref("Error.prototype.message", "TypeError.prototype.message")}}</dt>
<dd>
오류 메시지. 비록 ECMA-262에서 {{jsxref("TypeError")}}는 반드시 자체
- <code>message</code> 속성을 제공해야한다고 명시했지만,
+ <code>message</code> 속성을 제공해야 한다고 명시했지만,
<a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a>는
{{jsxref("Error.prototype.message")}}를 상속합니다.
</dd>
@@ -57,17 +55,16 @@ browser-compat: javascript.builtins.TypeError
</dt>
<dd>오류가 발생한 곳의 줄 위치. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
<dt>
- {{jsxref("Error.prototype.columnNumber",
- "TypeError.prototype.columnNumber")}}
+ {{jsxref("Error.prototype.columnNumber", "TypeError.prototype.columnNumber")}}
</dt>
<dd>오류가 발생한 곳의 열 위치. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
<dt>{{jsxref("Error.prototype.stack", "TypeError.prototype.stack")}}</dt>
<dd>스택 추적. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
</dl>
-<h2 id="예제">예제</h2>
+<h2 id="Examples">예제</h2>
-<h3 id="TypeError_오류를_잡아내기"><code>TypeError</code> 오류를 잡아내기</h3>
+<h3 id="Catching_a_TypeError"><code>TypeError</code> 오류를 잡아내기</h3>
<pre class="brush: js">
try {
@@ -83,7 +80,7 @@ try {
}
</pre>
-<h3 id="TypeError_오류를_생성하기"><code>TypeError</code> 오류를 생성하기</h3>
+<h3 id="Creating_a_TypeError"><code>TypeError</code> 오류를 생성하기</h3>
<pre class="brush: js">
try {
@@ -99,15 +96,15 @@ try {
}
</pre>
-<h2 id="명세">명세</h2>
+<h2 id="Specifications">명세</h2>
{{Specifications}}
-<h2 id="브라우저_호환성">브라우저 호환성</h2>
+<h2 id="Browser_compatibility">브라우저 호환성</h2>
<p>{{Compat}}</p>
-<h2 id="같이_보기">같이 보기</h2>
+<h2 id="See_also">같이 보기</h2>
<ul>
<li>{{jsxref("Error")}}</li>
diff --git a/files/ko/web/javascript/reference/global_objects/urierror/index.html b/files/ko/web/javascript/reference/global_objects/urierror/index.html
new file mode 100644
index 0000000000..91f721c511
--- /dev/null
+++ b/files/ko/web/javascript/reference/global_objects/urierror/index.html
@@ -0,0 +1,90 @@
+---
+title: URIError
+slug: Web/JavaScript/Reference/Global_Objects/URIError
+tags:
+ - Class
+ - JavaScript
+ - Object
+ - Reference
+ - URIError
+browser-compat: javascript.builtins.URIError
+---
+<div>{{JSRef}}</div>
+
+<p><code><strong>URIError</strong></code> 객체는 전역 URI 핸들링 함수가 잘못된 방식으로 사용되었을 때의 오류를 표현합니다.</p>
+
+<h2 id="Constructor">생성자</h2>
+
+<dl>
+ <dt>{{jsxref("Global_Objects/URIError/URIError", "URIError()")}}</dt>
+ <dd>새로운 <code>URIError</code> 객체를 만듭니다.</dd>
+</dl>
+
+<h2 id="Instance_properties">인스턴스 속성</h2>
+
+<dl>
+ <dt>{{jsxref("Error.prototype.message", "URIError.prototype.message")}}</dt>
+ <dd>오류 메시지. 비록 ECMA-262에서 {{jsxref("RangeError")}}는 반드시 자체 <code>message</code> 속성을 제공해야한다고 명시했지만,
+ <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey">SpiderMonkey</a>는 {{jsxref("Error.prototype.message")}}를 상속합니다.
+</dd>
+ <dt>{{jsxref("Error.prototype.name", "URIError.prototype.name")}}</dt>
+ <dd>오류 이름. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
+ <dt>{{jsxref("Error.prototype.fileName", "URIError.prototype.fileName")}}</dt>
+ <dd>오류가 발생한 파일 경로. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
+ <dt>{{jsxref("Error.prototype.lineNumber", "URIError.prototype.lineNumber")}}</dt>
+ <dd>오류가 발생한 곳의 줄 위치. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
+ <dt>{{jsxref("Error.prototype.columnNumber", "URIError.prototype.columnNumber")}}</dt>
+ <dd>오류가 발생한 곳의 열 위치. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
+ <dt>{{jsxref("Error.prototype.stack", "URIError.prototype.stack")}}</dt>
+ <dd>스택 추적. {{jsxref("Error")}}로부터 상속되었습니다.</dd>
+</dl>
+
+<h2 id="Examples">예제</h2>
+
+<h3 id="Catching_an_URIError">URIError 잡아내기</h3>
+
+<pre class="brush: js">try {
+ decodeURIComponent('%')
+} catch (e) {
+ console.log(e instanceof URIError) // true
+ console.log(e.message) // "malformed URI sequence"
+ console.log(e.name) // "URIError"
+ console.log(e.fileName) // "Scratchpad/1"
+ console.log(e.lineNumber) // 2
+ console.log(e.columnNumber) // 2
+ console.log(e.stack) // "@Scratchpad/2:2:3\n"
+}
+</pre>
+
+<h3 id="Creating_an_URIError">URIError 생성하기</h3>
+
+<pre class="brush: js">try {
+ throw new URIError('Hello', 'someFile.js', 10)
+} catch (e) {
+ console.log(e instanceof URIError) // true
+ console.log(e.message) // "Hello"
+ console.log(e.name) // "URIError"
+ console.log(e.fileName) // "someFile.js"
+ console.log(e.lineNumber) // 10
+ console.log(e.columnNumber) // 0
+ console.log(e.stack) // "@Scratchpad/2:2:9\n"
+}
+</pre>
+
+<h2 id="Specifications">명세</h2>
+
+{{Specifications}}
+
+<h2 id="Browser_compatibility">브라우저 호환성</h2>
+
+<p>{{Compat}}</p>
+
+<h2 id="See_also">같이 보기</h2>
+
+<ul>
+ <li>{{jsxref("Error")}}</li>
+ <li>{{jsxref("Global_Objects/decodeURI", "decodeURI()")}}</li>
+ <li>{{jsxref("Global_Objects/decodeURIComponent", "decodeURIComponent()")}}</li>
+ <li>{{jsxref("Global_Objects/encodeURI", "encodeURI()")}}</li>
+ <li>{{jsxref("Global_Objects/encodeURIComponent", "encodeURIComponent()")}}</li>
+</ul>
diff --git a/files/ko/web/javascript/reference/global_objects/urierror/urierror/index.html b/files/ko/web/javascript/reference/global_objects/urierror/urierror/index.html
new file mode 100644
index 0000000000..e443de2627
--- /dev/null
+++ b/files/ko/web/javascript/reference/global_objects/urierror/urierror/index.html
@@ -0,0 +1,83 @@
+---
+title: URIError() constructor
+slug: Web/JavaScript/Reference/Global_Objects/URIError/URIError
+tags:
+- Constructor
+- JavaScript
+- Reference
+- URIError
+browser-compat: javascript.builtins.URIError.URIError
+---
+<div>{{JSRef}}</div>
+
+<p><strong><code>URIError()</code></strong> 생성자는 전역 URI 핸들링 함수가 잘못 사용될 때 오류를 생성합니다.</p>
+
+<h2 id="Syntax">구문</h2>
+
+<pre class="brush: js">
+new URIError()
+new URIError(message)
+new URIError(message, fileName)
+new URIError(message, fileName, lineNumber)
+</pre>
+
+<h3 id="Parameters">매개변수</h3>
+
+<dl>
+ <dt><code><var>message</var></code> {{optional_inline}}</dt>
+ <dd>사람이 읽을 수 있는 에러에 대한 설명.</dd>
+ <dt><code><var>fileName</var></code> {{optional_inline}}</dt>
+ <dd>예외를 일으킨 코드가 들어있는 파일 이름.</dd>
+ <dt><code><var>lineNumber</var></code> {{optional_inline}}</dt>
+ <dd>예외를 일으킨 코드의 줄 수.</dd>
+</dl>
+
+<h2 id="Examples">예제</h2>
+
+<h3 id="Catching_an_URIError">URIError 잡기</h3>
+
+<pre class="brush: js">try {
+ decodeURIComponent('%')
+} catch (e) {
+ console.log(e instanceof URIError) // true
+ console.log(e.message) // "malformed URI sequence"
+ console.log(e.name) // "URIError"
+ console.log(e.fileName) // "Scratchpad/1"
+ console.log(e.lineNumber) // 2
+ console.log(e.columnNumber) // 2
+ console.log(e.stack) // "@Scratchpad/2:2:3\n"
+}
+</pre>
+
+<h3 id="Creating_an_URIError">URIError 생성하기</h3>
+
+<pre class="brush: js">try {
+ throw new URIError('Hello', 'someFile.js', 10)
+} catch (e) {
+ console.log(e instanceof URIError) // true
+ console.log(e.message) // "Hello"
+ console.log(e.name) // "URIError"
+ console.log(e.fileName) // "someFile.js"
+ console.log(e.lineNumber) // 10
+ console.log(e.columnNumber) // 0
+ console.log(e.stack) // "@Scratchpad/2:2:9\n"
+}
+</pre>
+
+<h2 id="Specifications">명세</h2>
+
+{{Specifications}}
+
+<h2 id="Browser_compatibility">브라우저 호환성</h2>
+
+<p>{{Compat}}</p>
+
+<h2 id="See_also">같이 보기</h2>
+
+<ul>
+ <li>{{jsxref("Error")}}</li>
+ <li>{{jsxref("Global_Objects/decodeURI", "decodeURI()")}}</li>
+ <li>{{jsxref("Global_Objects/decodeURIComponent", "decodeURIComponent()")}}</li>
+ <li>{{jsxref("Global_Objects/encodeURI", "encodeURI()")}}</li>
+ <li>{{jsxref("Global_Objects/encodeURIComponent", "encodeURIComponent()")}}</li>
+</ul>