Thanks for both the suggestion and the patch review.

For future reference on submitting patches -- is it best to email a patch or
is there some more savvy git trick?

Lee

On Fri, Mar 6, 2009 at 8:47 AM, Derek Chen-Becker <dchenbec...@gmail.com>wrote:

> I agree that it's an iffy pattern, but I also think that it's important to
> make error messages as clear as possible. I'm testing the patch right now
> (made a minor mod) and I'll push the branch to github in a little bit for
> review.
>
> Derek
>
> On Fri, Mar 6, 2009 at 9:14 AM, Timothy Perrett 
> <timo...@getintheloop.eu>wrote:
>
>>
>> Lee,
>>
>> That seems like a pretty dangerous opertation. Wouldn’t you do:
>>
>> class MySnippet {
>>   val file: Box[Source] = tryo {
>>     Source.fromFile("mistypedFileName")
>>   }
>> }
>>
>> In this way you could then use pattern matching and avoid NPE’s
>>
>> Cheers, Tim
>> - Show quoted text -
>>
>>
>> On 06/03/2009 16:04, "Lee Mighdoll" <leemighd...@gmail.com> wrote:
>>
>> - Show quoted text -
>>
>> Sure, thanks for taking a look.  My snippet class had something like this:
>>
>> import scala.io.Source
>>
>> class MySnippet {
>>   val file = Source.fromFile("mistypedFileName")
>> }
>>
>> (The patched version generates two error log messages in this case.  I
>> couldn't figure out a small patch to make it just one message.)
>>
>> Lee
>>
>> On Fri, Mar 6, 2009 at 7:20 AM, Derek Chen-Becker <dchenbec...@gmail.com>
>> wrote:
>>
>> Let me create a branch for this and test it out. Also, could you tell me
>> what the error was with your snippet so I can compare current behavior with
>> what the patch provides?
>>
>> Derek
>>
>>
>> On Thu, Mar 5, 2009 at 10:59 PM, Lee Mighdoll <leemighd...@gmail.com>
>> wrote:
>>
>> When I had a bug which threw an exception instantiating my snippet, Lift
>> logged a confusing error message: "ClassNotFound".  The class was found, it
>> just didn't run correctly...
>>
>> Enclosed is a patch to show a more informative error message.
>>
>> Lee
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to