<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[פעולת try/finally מפריע לcatch שמעליו או לא - nodejs]]></title><description><![CDATA[<p dir="rtl">בהמשך לנאמר כאן לגבי ספרית yemot router (nodejs)</p>
<blockquote>
<p dir="rtl">הid_list_message בלי פרמטר prepend to next זורק שגיאה</p>
<p dir="rtl">אם אתה לא עושה עליה try catch אז הפונקציה נעצרת והשגיאה מטופלת על ידי הראוטר</p>
<p dir="rtl">אם אתה עושה try catch ולא בודק את סוג השגיאה, זה בעיה</p>
<p dir="rtl">בכללי אין סיבה בדוגמאות שהבאת לעשות try catch כי יש הנדלר גלובלי לשגיאות לא צפויות</p>
<p dir="rtl">אם היה לך נניח קוד שמנסה API אחד ואם הוא נכשל מנסה אחר, זה היה הגיוני, אבל רק מסביב הקוד הספציפי הזה ולא לעטוף את כל הקוד</p>
</blockquote>
<p dir="rtl">שזה בעצם אומר שיש try catch מובנים שתופסים את כל השגיאות, אם לא מפריעים להם עם try catch משלנו, האם גם try finally מפריע? האם הcatch הוא זה שתופס את השגיאות וכל עוד הוא לא שם הקוד בטוח, או שעצם הבלוק try תופס שגיאות רק שכיוון שאין catch הוא לא מנתב אותם ולא עושה איתם כלום.</p>
<p dir="rtl">חיפשתי עד כמה שהצלחתי איך עובדות שגיאות בjava script ולא מצאתי מענה על זה, כולם מתעלמים (בצדק לדעתי) מנקודה זו.</p>
<p dir="rtl">אשמח לעזרה בנושא.</p>
]]></description><link>https://tchumim.com/topic/17337/פעולת-try-finally-מפריע-לcatch-שמעליו-או-לא-nodejs</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 16:41:49 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/17337.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 01 Jan 2026 21:03:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Fri, 02 Jan 2026 07:49:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> אוקיי זה נכון, אבל אם אתה לא בודק שהמאזין באמת שמע או משהו כזה אין לך עניין לסמן רק אחרי<br />
אתה יכול לסמן ואז לעשות read</p>
]]></description><link>https://tchumim.com/post/169826</link><guid isPermaLink="true">https://tchumim.com/post/169826</guid><dc:creator><![CDATA[צדיק תמים]]></dc:creator><pubDate>Fri, 02 Jan 2026 07:49:47 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Fri, 02 Jan 2026 07:46:23 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A6%D7%93%D7%99%D7%A7-%D7%AA%D7%9E%D7%99%D7%9D" aria-label="Profile: צדיק-תמים">@<bdi>צדיק-תמים</bdi></a> כתב ב<a href="/post/169824">פעולת try/finally מפריע לcatch שמעליו או לא - nodejs</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> כתב ב<a href="/post/169823">פעולת try/finally מפריע לcatch שמעליו או לא - nodejs</a>:</p>
<blockquote>
<p dir="rtl">לא כ"כ הבנתי, אני לא צריך לבדוק כמה זמן עבר, מבחינתי ברגע שפקודת ההשמעה נשלחה לימות המשיח - הוא שמע את המודעה ואני מסמן אותה כנקראה</p>
</blockquote>
<p dir="rtl">אז אתה יכול כבר לסמן לפני ששלחת את התגובה, אין משמעות לכמה אלפיות שניה שהקוד מחזיר את התגובה</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> כתב ב<a href="/post/169823">פעולת try/finally מפריע לcatch שמעליו או לא - nodejs</a>:</p>
<blockquote>
<p dir="rtl">אני לא יכול להשתמש שם בקומבינה של הרצת קוד לאחר החזרת תשובה למחייג בגלל שהמערכת לא בנויה מראש בשביל שישמע וינתק או שישמע מודעה והמערכת תוציא אותו, הוא שומע את המודעות כסדר (לכן זה read ולאid_list_message) ויש לו על זה תפריט, רק צריך לחשוב גם על מקרה שינתק באמצע. לכן שמתי בfinally.</p>
</blockquote>
<p dir="rtl">לא הבנתי כלום</p>
</blockquote>
<p dir="rtl">הקומבינה של הרצת קוד לאחר החזרת תשובה למשתמש, נצרכת אם עושים call.id_list_message, כי אז הקוד גומר את פעלותו ומה שאחריו - סימון המודעה - לא מתבצע. אבל כאן אני לא משתמש בזה אלא בcall.read והקוד אמור להמשיך לרוץ ככה שאם לא יהיו בעיות הקוד אמור לרוץ, כל מה שאני עושה finally זה למקרה שהמחייג ינתק.</p>
<p dir="rtl">מקוה שהייתי מובן הפעם.</p>
]]></description><link>https://tchumim.com/post/169825</link><guid isPermaLink="true">https://tchumim.com/post/169825</guid><dc:creator><![CDATA[eido]]></dc:creator><pubDate>Fri, 02 Jan 2026 07:46:23 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Fri, 02 Jan 2026 07:34:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> כתב ב<a href="/post/169823">פעולת try/finally מפריע לcatch שמעליו או לא - nodejs</a>:</p>
<blockquote>
<p dir="rtl">לא כ"כ הבנתי, אני לא צריך לבדוק כמה זמן עבר, מבחינתי ברגע שפקודת ההשמעה נשלחה לימות המשיח - הוא שמע את המודעה ואני מסמן אותה כנקראה</p>
</blockquote>
<p dir="rtl">אז אתה יכול כבר לסמן לפני ששלחת את התגובה, אין משמעות לכמה אלפיות שניה שהקוד מחזיר את התגובה</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> כתב ב<a href="/post/169823">פעולת try/finally מפריע לcatch שמעליו או לא - nodejs</a>:</p>
<blockquote>
<p dir="rtl">אני לא יכול להשתמש שם בקומבינה של הרצת קוד לאחר החזרת תשובה למחייג בגלל שהמערכת לא בנויה מראש בשביל שישמע וינתק או שישמע מודעה והמערכת תוציא אותו, הוא שומע את המודעות כסדר (לכן זה read ולאid_list_message) ויש לו על זה תפריט, רק צריך לחשוב גם על מקרה שינתק באמצע. לכן שמתי בfinally.</p>
</blockquote>
<p dir="rtl">לא הבנתי כלום</p>
]]></description><link>https://tchumim.com/post/169824</link><guid isPermaLink="true">https://tchumim.com/post/169824</guid><dc:creator><![CDATA[צדיק תמים]]></dc:creator><pubDate>Fri, 02 Jan 2026 07:34:13 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Fri, 02 Jan 2026 07:27:31 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A6%D7%93%D7%99%D7%A7-%D7%AA%D7%9E%D7%99%D7%9D" aria-label="Profile: צדיק-תמים">@<bdi>צדיק-תמים</bdi></a> כן, אני משתמש בזה מאז.</p>
<p dir="rtl">לא כ"כ הבנתי, אני לא צריך לבדוק כמה זמן עבר, מבחינתי ברגע שפקודת ההשמעה נשלחה לימות המשיח - הוא שמע את המודעה ואני מסמן אותה כנקראה, אני לא צריך לבדוק אם עבר מספיק זמן בשביל שהוא ישמע את זה.</p>
<p dir="rtl">אני לא יכול להשתמש שם בקומבינה של הרצת קוד לאחר החזרת תשובה למחייג בגלל שהמערכת לא בנויה מראש בשביל שישמע וינתק או שישמע מודעה והמערכת תוציא אותו, הוא שומע את המודעות כסדר (לכן זה read ולאid_list_message) ויש לו על זה תפריט, רק צריך לחשוב גם על מקרה שינתק באמצע. לכן שמתי בfinally.</p>
<p dir="rtl">או שלא הבנתי משהו נכון?</p>
]]></description><link>https://tchumim.com/post/169823</link><guid isPermaLink="true">https://tchumim.com/post/169823</guid><dc:creator><![CDATA[eido]]></dc:creator><pubDate>Fri, 02 Jan 2026 07:27:31 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Thu, 01 Jan 2026 23:04:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> אני לא רואה שאתה בודק כמה זמן עבר, הוא יכול לנתק רגע אחרי שהחזרת את התגובה לימות<br />
בכל אופן יש על מקרה כזה תיעוד מפורט<br />
<a href="https://github.com/ShlomoCode/yemot-router2#%D7%94%D7%A8%D7%A6%D7%AA-%D7%A7%D7%95%D7%93-%D7%9C%D7%90%D7%97%D7%A8-%D7%94%D7%97%D7%96%D7%A8%D7%AA-%D7%AA%D7%A9%D7%95%D7%91%D7%94-%D7%9C%D7%9E%D7%97%D7%99%D7%99%D7%92" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ShlomoCode/yemot-router2#הרצת-קוד-לאחר-החזרת-תשובה-למחייג</a></p>
<p dir="rtl">כבר שלחתי לך אותו בעבר</p>
]]></description><link>https://tchumim.com/post/169822</link><guid isPermaLink="true">https://tchumim.com/post/169822</guid><dc:creator><![CDATA[צדיק תמים]]></dc:creator><pubDate>Thu, 01 Jan 2026 23:04:56 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Thu, 01 Jan 2026 22:50:52 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A6%D7%93%D7%99%D7%A7-%D7%AA%D7%9E%D7%99%D7%9D" aria-label="Profile: צדיק-תמים">@<bdi>צדיק-תמים</bdi></a> אבל בread שומעים את המודעה, ואם הוא ינתק לפני הread זה יסומן סתם כנקרא.</p>
]]></description><link>https://tchumim.com/post/169821</link><guid isPermaLink="true">https://tchumim.com/post/169821</guid><dc:creator><![CDATA[eido]]></dc:creator><pubDate>Thu, 01 Jan 2026 22:50:52 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Thu, 01 Jan 2026 22:49:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> כתב ב<a href="/post/169819">פעולת try/finally מפריע לcatch שמעליו או לא - nodejs</a>:</p>
<blockquote>
<p dir="rtl">פשוט הייתי חייב לסמן מודעה כנקראה גם אם הוא ינתק באמצע.</p>
</blockquote>
<p dir="rtl">אז קודם תסמן כנקרא ואז תפעיל read</p>
]]></description><link>https://tchumim.com/post/169820</link><guid isPermaLink="true">https://tchumim.com/post/169820</guid><dc:creator><![CDATA[צדיק תמים]]></dc:creator><pubDate>Thu, 01 Jan 2026 22:49:42 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Thu, 01 Jan 2026 22:41:02 GMT]]></title><description><![CDATA[<p dir="rtl"><a class="plugin-mentions-user plugin-mentions-a" href="/user/%D7%A6%D7%93%D7%99%D7%A7-%D7%AA%D7%9E%D7%99%D7%9D" aria-label="Profile: צדיק-תמים">@<bdi>צדיק-תמים</bdi></a> לא, הפעם הוא נקודתי ממש</p>
<pre><code>try {
            //    toDo = await call.read(tempAd,
            toDo = await call.read([...tempAd,{ type: 'file', data: `/ivr_records/שמיעה1` }],
                'tap',
                {sec_wait: 2, min_digits: 1, typing_playback_mode: "No", digits_allowed: [1, 2, 3, "*0"] });
                }
                finally{
                console.log("מסמן כנקראה");
               await updateBuyerAds(paramAndAdsContent[indexOfSubscrib].ads.new[i1].adId, call);
            //    console.log(`סימן כנקראה את מודעה ${paramAndAdsContent[indexOfSubscrib].ads.new[i1].adId}`);
            }
</code></pre>
<p dir="rtl">פשוט הייתי חייב לסמן מודעה כנקראה גם אם הוא ינתק באמצע. לכן אני לא יכול לוותר עליו.</p>
]]></description><link>https://tchumim.com/post/169819</link><guid isPermaLink="true">https://tchumim.com/post/169819</guid><dc:creator><![CDATA[eido]]></dc:creator><pubDate>Thu, 01 Jan 2026 22:41:02 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Thu, 01 Jan 2026 22:37:20 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> כן, כי אתה זורק את השגיאה שוב מחוץ לבלוק try<br />
רק מה ש try { פה } נתפס<br />
אבל אתה לא אמור להגיע למצב כזה בדרך כלל, כי אתה לא אמור לעטוף קטעי קוד גדולים<br />
בכל מקרה עדיף שתזרוק מחדש בcatch ולא בfinnaly כי אז יש לך את המשתנה של השגיאה לזרוק אותה מחדש</p>
]]></description><link>https://tchumim.com/post/169818</link><guid isPermaLink="true">https://tchumim.com/post/169818</guid><dc:creator><![CDATA[צדיק תמים]]></dc:creator><pubDate>Thu, 01 Jan 2026 22:37:20 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Thu, 01 Jan 2026 22:32:28 GMT]]></title><description><![CDATA[<p dir="rtl">אז, אם אחרי מה שאני צריך לעשות אעשה (בfinally) גם throw זה כן יתפס בהנדלר?</p>
]]></description><link>https://tchumim.com/post/169817</link><guid isPermaLink="true">https://tchumim.com/post/169817</guid><dc:creator><![CDATA[eido]]></dc:creator><pubDate>Thu, 01 Jan 2026 22:32:28 GMT</pubDate></item><item><title><![CDATA[Reply to פעולת try/finally מפריע לcatch שמעליו או לא - nodejs on Thu, 01 Jan 2026 22:25:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eido" aria-label="Profile: eido">@<bdi>eido</bdi></a> כתב ב<a href="/post/169814">פעולת try/finally מפריע לcatch שמעליו או לא - nodejs</a>:</p>
<blockquote>
<p dir="rtl">עצם הבלוק try תופס שגיאות</p>
</blockquote>
<p dir="rtl">כן<br />
אם אתה עושה try finally אתה פשוט בולע את השגיאה<br />
ממליץ על הספר <a href="https://hebdevbook.com/product/jsheb/" target="_blank" rel="noopener noreferrer nofollow ugc">https://hebdevbook.com/product/jsheb/</a></p>
]]></description><link>https://tchumim.com/post/169816</link><guid isPermaLink="true">https://tchumim.com/post/169816</guid><dc:creator><![CDATA[צדיק תמים]]></dc:creator><pubDate>Thu, 01 Jan 2026 22:25:56 GMT</pubDate></item></channel></rss>