inkle/ink

Don't throw exception from ContentAtPath

開放

#211 建立於 2016年10月16日

 (0 則留言) (0 個反應) (0 位負責人)C# (466 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (3,743 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Container's ContentAtPath currently throws an exception if it fails, which creates some rather ugly try/catch code in a number of places where we want to be able to fail gracefully if the content can't be found.

Convert ContentAtPath to return null if it doesn't find the content, and throw exceptions at the call site where it's still intended. (Such as in the main Step() function).

Note that this should be relatively straightforward if anyone wants to give it a try! (Though not before #210 is fixed so you can verify your code!)

貢獻者指南