الفرق بين المراجعتين ل"Ruby/UncaughtThrowError"

من موسوعة حسوب
اذهب إلى التنقل اذهب إلى البحث
(أنشأ الصفحة ب'<noinclude>{{DISPLAYTITLE: صفحة الصنف <code>UncaughtThrowError</code> في روبي}}</noinclude> تصنيف: Ruby تصنيف: Ruby UncaughtThrowErrorي...')
 
سطر 1: سطر 1:
 
<noinclude>{{DISPLAYTITLE: صفحة الصنف <code>UncaughtThrowError</code> في روبي}}</noinclude>
 
<noinclude>{{DISPLAYTITLE: صفحة الصنف <code>UncaughtThrowError</code> في روبي}}</noinclude>
 
[[تصنيف: Ruby]]
 
[[تصنيف: Ruby]]
[[تصنيف: Ruby UncaughtThrowError]]يُطلق الاستثناء عندما يتم استدعاء <code>throw</code> مع  
+
[[تصنيف: Ruby UncaughtThrowError]]
وسم (tag)
+
يُطلق الاستثناء <code>UncaughtThrowError</code> عندما يتم استدعاء <code>throw</code> مع وسم (tag) لا يحتوي على كتلة <code>catch</code> المقابلة.
لا يحتوي على كتلة <code>catch</code> المقابلة.
 
 
<syntaxhighlight lang="ruby">throw "foo", "bar"‎</syntaxhighlight>  
 
<syntaxhighlight lang="ruby">throw "foo", "bar"‎</syntaxhighlight>  
 
يطلق الاستثناء:
 
يطلق الاستثناء:
سطر 9: سطر 8:
 
==توابع الصنف العامة (Public Class Methods)==
 
==توابع الصنف العامة (Public Class Methods)==
 
===[[Ruby/UncaughtThrowError/new | التابع new]]===
 
===[[Ruby/UncaughtThrowError/new | التابع new]]===
فئة الوثيقة: <code>[[Ruby/UncaughtThrowError|UncaughtThrowError]]</code>
+
يُطلق هذا الاستثناء عندما يتم استدعاء <code>throw</code> مع وسم <code>tag</code> لا يحتوي على كتلة <code>catch</code> المقابلة.
 +
 
 +
== توابع النسخة العامة (Public Instance Methods) ==
 +
 
 
===[[Ruby/UncaughtThrowError/tag | التابع tag]]===
 
===[[Ruby/UncaughtThrowError/tag | التابع tag]]===
يعيد التابع <code>tag</code> كائن الوسم (tag object) الذي تم استُدعي معه.
+
يعيد التابع <code>tag</code> كائن الوسم (tag object) الذي استُدعي معه.
 
===[[Ruby/UncaughtThrowError/to_s | التابع to_s]]===
 
===[[Ruby/UncaughtThrowError/to_s | التابع to_s]]===
يعيد ظظ رسالة منسقة تحتوي الوسم (tag).
+
يعيد رسالة منسقة تحتوي الوسم (tag).
 
===[[Ruby/UncaughtThrowError/value | التابع value]]===
 
===[[Ruby/UncaughtThrowError/value | التابع value]]===
يعيد التابع <code>value</code> القيمة المعادة من الوسم الذي تم استدعي معه.
+
يعيد التابع <code>value</code> القيمة المعادة من الوسم الذي استدعي معه.
 
==مصادر==
 
==مصادر==
 
*[http://ruby-doc.org/core-2.5.1/UncaughtThrowError.html قسم  الصنف UncaughtThrowError في توثيق روبي الرسمي.]
 
*[http://ruby-doc.org/core-2.5.1/UncaughtThrowError.html قسم  الصنف UncaughtThrowError في توثيق روبي الرسمي.]

مراجعة 13:07، 8 نوفمبر 2018

يُطلق الاستثناء UncaughtThrowError عندما يتم استدعاء throw مع وسم (tag) لا يحتوي على كتلة catch المقابلة.

throw "foo", "bar"

يطلق الاستثناء:

UncaughtThrowError: uncaught throw "foo"

توابع الصنف العامة (Public Class Methods)

التابع new

يُطلق هذا الاستثناء عندما يتم استدعاء throw مع وسم tag لا يحتوي على كتلة catch المقابلة.

توابع النسخة العامة (Public Instance Methods)

التابع tag

يعيد التابع tag كائن الوسم (tag object) الذي استُدعي معه.

التابع to_s

يعيد رسالة منسقة تحتوي الوسم (tag).

التابع value

يعيد التابع value القيمة المعادة من الوسم الذي استدعي معه.

مصادر