From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 1783819C003A for ; Tue, 3 Nov 2015 21:21:36 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 9C0CFB5D988 for ; Tue, 3 Nov 2015 21:50:17 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 8D8B895243A for ; Tue, 3 Nov 2015 21:50:17 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 289051204C7; Tue, 3 Nov 2015 21:50:16 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id E2E1F12047B for ; Tue, 3 Nov 2015 21:50:12 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=d3aDxgE9BZmDabsuAMjSvKuS5ik=; b=IGBS63im3kQF3vwX9k QYkscMznSP9pic+wGLyIeV1e1n2f/vIcdiDZxSimlN8Kt7jId+HL58FctDqh2qrD g67GrVl0hRBg0zL+iZ1nRZcp8bgfOTyR1LNcsSrrz8jK9SArIQJZrC1ojiBhM8Nr yoKhERYQwqoj4NAy8rpvMnkxM= Received: by filter0604p1mdw1.sendgrid.net with SMTP id filter0604p1mdw1.12986.5638ABC333 2015-11-03 12:42:43.854502623 +0000 UTC Received: from herokuapp.com (ec2-107-21-169-17.compute-1.amazonaws.com [107.21.169.17]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id XsE0zROJQ7Sd1TyDzqB2uw for ; Tue, 03 Nov 2015 12:42:43.842 +0000 (UTC) Date: Tue, 03 Nov 2015 12:42:43 +0000 From: nobu@ruby-lang.org To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Redmine-MailingListIntegration-Message-Ids: 45954 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11650 X-Redmine-Issue-Author: kirs X-Redmine-Sender: nobu X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS4ypX/HvZCtTv01IZZMhptne/J97rsFDvif7Q +y+hoPQ3HBrJrukd2YUuU/0rINfJ9NQQT/iYJ0Tsh7R27YAq0Fx8IkaTHuitM0yuXIqTYcXRcF5kJS dm3SXvZMlV+YGmnjnZQCT6PPCSY93xB2KnQs X-ML-Name: ruby-core X-Mail-Count: 71314 Subject: [ruby-core:71314] [Ruby trunk - Feature #11650] Add custom error message arg to Timeout.timeout X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11650 has been updated by Nobuyoshi Nakada. Description updated Sounds reasonable. ---------------------------------------- Feature #11650: Add custom error message arg to Timeout.timeout https://bugs.ruby-lang.org/issues/11650#change-54687 * Author: Kir Shatrov * Status: Open * Priority: Normal * Assignee:=20 ---------------------------------------- Now Timeout.timeout can accept custom error message: ~~~ruby Timeout.timeout(30, CustomException, =E2=80=9Ccustom_message=E2=80=9D) ~~~ This option might be useful for networking: ~~~ruby # net/smtp.rb#do_start Timeout.timeout(30, Net::OpenTimeout, "failed to open #{host}") do tcp_connection end ~~~ ---Files-------------------------------- feature.diff (1.66 KB) --=20 https://bugs.ruby-lang.org/