1. Glossaryفەرهەنگی زاراوەکان
Exception handling
مامەڵەکردن لەگەڵ هەڵاوێردە
Proposed Kurdish term — under reviewزاراوەی پێشنیارکراو — لە ژێر پێداچوونەوەدایە

Definitionپێناسە

Catching an so that the program can react instead of crashing. In Python the risky code goes in try: and the reaction in except ValueError:; Java and C# use try and catch. Catch only the errors you expect.

گرتنی بۆ ئەوەی کاردانەوەی هەبێت لەبری ئەوەی تێک بشکێت. لە Pythonـدا کۆدە مەترسیدارەکە دەچێتە ناو try: و کاردانەوەکە دەچێتە ناو except ValueError:؛ Java و ⁦C#⁩ try و catch بەکار دەهێنن. تەنها ئەو هەڵانە بگرە کە چاوەڕێیان دەکەیت.

Exampleنموونە

This loop asks again until the user types a whole number, instead of crashing on two.

ئەم دووبارە دەپرسێتەوە تا دەنووسێت، لەبری ئەوەی بە نووسینی two تێک بشکێت.

while True:
    try:
        age = int(input("Age: "))
        break
    except ValueError:
        print("Please type a whole number.")

Other Kurdish renderings in useوەرگێڕانە کوردییەکانی تر

چارەسەرکردنی هەڵاوێردە

Note on the Kurdish termتێبینی دەربارەی زاراوە کوردییەکە

Built like the registry's form-handling (مامەڵەکردن لەگەڵ فۆرم) on its exception (هەڵاوێردە). Proposed.

Related termsزاراوە پەیوەندیدارەکان

Videosڤیدیۆکان

Exceptions in Python || Python Tutorial || Learn Python ProgrammingSocratica · Englishئینگلیزی · 292K viewsبینین · 9.5K likesلایک · Partبەشی 4:32–8:14 (ofلە 9:01)
Try / Except | Python | Tutorial 27Giraffe Academy · Englishئینگلیزی · 71K viewsبینین · 2.2K likesلایک · Partبەشی 2:20–8:43 (ofلە 8:43)
Read files using Python! 🔍Bro Code · Englishئینگلیزی · 49K viewsبینین · 1K likesلایک · Partبەشی 2:26–4:12 (ofلە 6:56)
21- گرتنی هه ڵه كان Try - ExceptMR. Ant · Kurdish (Sorani)کوردی (سۆرانی) · 4.4K viewsبینین · 159 likesلایک

A Kurdish (Sorani) lesson on catching errors in Python with try and except, so a wrong input no longer stops the program.

وانەیەکی کوردی (سۆرانی) دەربارەی گرتنی لە بە try و except، بۆ ئەوەی هەڵە چیتر ڕانەگرێت.

Learn more inزیاتر فێربە لە