2
A
回答
1
不幸的是沒有--keep-going
在rake
(我認爲這很好)。我能想到的唯一方法是用begin; rescue; end
包裝你的Rakefile,但它不會讓它「繼續前進」 - 它只會確保你的rake
的執行返回值是0
。
begin
# Former Rakefile code goes here
rescue
puts $!.inspect
end
我相信,「堅持下去」是不可能的,因爲當你raise
東西,你已經改變了算法的流程 - 即不要試圖忽視例外解決您的問題。
相關問題
- 1. 在matlab中等價於diag(x,k)
- 2. 在Python中是否有Rake等價物?
- 3. Rake的'sh'等於Jake嗎?
- 4. 等價於getbounds
- 5. Rake:自動刪除中間文件? (對make .INTERMEDIATE機制等效?)
- 6. windows等價於inet_aton
- 7. DataGridView等價於DataGrid.NavigateTo()
- 8. jconsole等價於.Net?
- 9. XmlSerializer等價於IExtensibleDataObject
- 10. java等價於mkstemp
- 11. 「TYPEOF」等價於Mysql?
- 12. JVMTI等價於.NET
- 13. viewWillDisappear等價於CCScenes
- 14. Scala等價於pyTables?
- 15. C++等價於Tidy
- 16. jQuery等價於querySelector
- 17. ASMX等價於Page_Init?
- 18. JMS等價於.Net
- 19. Application.ProductName等價於WPF?
- 20. getModel等價於ModelForms?
- 21. ART等價於dvmDumpAllThreads
- 22. C++等價於SerializeWithLengthPrefix
- 23. SizeToContent等價於WinForm?
- 24. WPF等價於TextRenderer
- 25. GLSL等價於sampler_state?
- 26. emacs等價於ct
- 27. Android等價於org.apache.commons.io.IOUtils.toByteArray
- 28. WPF等價於ActiveControl?
- 29. Python等價於ignoreboth:erasedups
- 30. jQuery等價於window.document.write
用@jmonteiro建議的類似方式解決了我的問題: rule'.o'=> ['.c'] do | t | begin sh「cc#{t.source} -c -o#{t.name}」 rescue RuntimeError => e if keep_going? next 0 else raise e end end end – hausen 2012-02-23 16:07:21