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 1F43B19C003A for ; Tue, 3 Nov 2015 18:59:12 +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 1DCD6B5D83C for ; Tue, 3 Nov 2015 19:27:53 +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 1AE4195243A for ; Tue, 3 Nov 2015 19:27:52 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 82D271204AC; Tue, 3 Nov 2015 19:27:50 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 27DCB120461 for ; Tue, 3 Nov 2015 19:27:46 +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=RVHmEWFuCvOLQrGQQkfw9reKNbA=; b=aoVyZTaiNuW5h/0Q6f 7hygpw9M9aE7c997YTQ5vSb+GK2hTglyjXZNsnCHLDLjVAHh/1M7Vo0K41ClObt1 GmhZwE4Z0lQ41QgD3BCk3mPYKfacriK8EotLv6e5agqW4ceYhmgsyr0eO5prGgif 4lTHO3dk1lD2hJleBndyI916k= Received: by filter0546p1mdw1.sendgrid.net with SMTP id filter0546p1mdw1.31554.56388C1FA 2015-11-03 10:27:43.134483521 +0000 UTC Received: from herokuapp.com (ec2-174-129-90-73.compute-1.amazonaws.com [174.129.90.73]) by ismtpd0003p1iad1.sendgrid.net (SG) with ESMTP id _HbVG3NcRMmT3oHWGm4vUg for ; Tue, 03 Nov 2015 10:27:42.804 +0000 (UTC) Date: Tue, 03 Nov 2015 10:27:42 +0000 From: shatrov@me.com 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: 45951 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11650 X-Redmine-Issue-Author: kirs X-Redmine-Sender: kirs 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS6gtI+wOfEgPuMpy2lW5u35LexJBOavh788p/ tEV3QwwT5nlk4yWFYBHWw3wD387Wn/2yoqS2XYbunePNNBnREE8irXlDDh/Raqe/1D9S1moEIoQXhM /ugIGck7WsytitIS+hK75GoJIIJRqffAMeus X-ML-Name: ruby-core X-Mail-Count: 71312 Subject: [ruby-core:71312] [Ruby trunk - Feature #11650] [Open] 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 reported by Kir Shatrov. ---------------------------------------- Feature #11650: Add custom error message arg to Timeout.timeout https://bugs.ruby-lang.org/issues/11650 * Author: Kir Shatrov * Status: Open * Priority: Normal * Assignee:=20 ---------------------------------------- Now Timeout.timeout can accept custom error message: ~~~ Timeout.timeout(30, CustomException, =E2=80=9Ccustom_message=E2=80=9D) ~~~ This option might be useful for networking: ~~~ # 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/