I just came across an error when using the orm.hibernate.AbstractGateway class.
Element ID is undefined in LOCAL. The error occurred in *C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line 151* *Called from* C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line 80 *Called from* <generated>: line 1 *Called from* C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc: line 53 *Called from* C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47 *Called from* C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 266
There's nothing soecfically difficult to work out here - I used a getXXX() method and didn't provide an ID argument.
Adding an ID corrected the issue in my code - all was good in the world.
I thought I would add some code to the AbstractGateway class - and specifically check that the missingMethodArguments was defined. but couldn't work what I should be returning. I checked the sessionWrapper that it seemed to be using for everything else - to see if there was some sort of "throwError" method - but couldn't find one.
So I thought I would shoot off a message and see if it was a worthwhile suggestion (creating a custom error message function AND using the new function if something happens internally with the AbstractGateway). And if it was - is there a specific place that makes the most sense to implement such a method?
Lastly, While checking through the AbstractGateway I also noted on line 161 is the following line; return getSessionWrapper().new(local.class);;
> I just came across an error when using the orm.hibernate.AbstractGateway
> class.
> Element ID is undefined in LOCAL. The error occurred in *C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
> line 151*
> *Called from* C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
> line 80
> *Called from* <generated>: line 1
> *Called from* C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc:
> line 53
> *Called from* C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47
> *Called from* C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line
> 266
> There's nothing soecfically difficult to work out here - I used a getXXX()
> method and didn't provide an ID argument.
> Adding an ID corrected the issue in my code - all was good in the world.
> I thought I would add some code to the AbstractGateway class - and
> specifically check that the missingMethodArguments was defined.
> but couldn't work what I should be returning.
> I checked the sessionWrapper that it seemed to be using for everything
> else - to see if there was some sort of "throwError" method - but couldn't
> find one.
> So I thought I would shoot off a message and see if it was a worthwhile
> suggestion (creating a custom error message function AND using the new
> function if something happens internally with the AbstractGateway).
> And if it was - is there a specific place that makes the most sense to
> implement such a method?
> Lastly,
> While checking through the AbstractGateway I also noted on line 161 is the
> following line;
> return getSessionWrapper().new(local.class);;
> I assume the extra semi-colon is redundant?
> Gavin.
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.
Hi Mark, Here is a diff that will provide a specific error message for a missing ID argument. Of course - feel free to butcher it as required to suit you style / design standard.
- if(not len(local.id) OR local.id lte 0) + if(not len(local.id) OR local.id lte 0) + { + return getSessionWrapper().new(local.class); + } + + local.return = getSessionWrapper().get(local.class, local.id); + } + else { - return getSessionWrapper().new(local.class); + //throw an exception if the ID argument was not passed in + new coldspring.exception.Exception('MIssing ID argument', 'The ID argument was required, but not provided'); } - - local.return = getSessionWrapper().get(local.class, local.id); }
On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:
> Better error handling is always good :)
> Have a look at the base exception.Exception object for how Coldspring > manages exceptions.
> Mark
> On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:
>> Hi there everyone,
>> I just came across an error when using the orm.hibernate.AbstractGateway >> class.
>> Element ID is undefined in LOCAL. The error occurred in *C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: >> line 151* >> *Called from* C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: >> line 80 >> *Called from* <generated>: line 1 >> *Called from* C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc: >> line 53 >> *Called from* C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47 >> *Called from* C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line >> 266
>> There's nothing soecfically difficult to work out here - I used a >> getXXX() method and didn't provide an ID argument.
>> Adding an ID corrected the issue in my code - all was good in the world.
>> I thought I would add some code to the AbstractGateway class - and >> specifically check that the missingMethodArguments was defined. >> but couldn't work what I should be returning. >> I checked the sessionWrapper that it seemed to be using for everything >> else - to see if there was some sort of "throwError" method - but couldn't >> find one.
>> So I thought I would shoot off a message and see if it was a worthwhile >> suggestion (creating a custom error message function AND using the new >> function if something happens internally with the AbstractGateway). >> And if it was - is there a specific place that makes the most sense to >> implement such a method?
>> Lastly, >> While checking through the AbstractGateway I also noted on line 161 is >> the following line; >> return getSessionWrapper().new(local.class);;
>> I assume the extra semi-colon is redundant?
>> Gavin.
>> -- >> You received this message because you are subscribed to the Google Groups >> "ColdSpring-Users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ. >> To post to this group, send email to coldspring-users@googlegroups.com. >> To unsubscribe from this group, send email to >> coldspring-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/coldspring-users?hl=en.
On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:
> Hi Mark, > Here is a diff that will provide a specific error message for a missing ID > argument. > Of course - feel free to butcher it as required to suit you style / design > standard.
> On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:
>> Better error handling is always good :)
>> Have a look at the base exception.Exception object for how Coldspring >> manages exceptions.
>> Mark
>> On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:
>>> Hi there everyone,
>>> I just came across an error when using the orm.hibernate.AbstractGateway >>> class.
>>> Element ID is undefined in LOCAL. The error occurred in *C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: >>> line 151* >>> *Called from* C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: >>> line 80 >>> *Called from* <generated>: line 1 >>> *Called from* C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc: >>> line 53 >>> *Called from* C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47 >>> *Called from* C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line >>> 266
>>> There's nothing soecfically difficult to work out here - I used a >>> getXXX() method and didn't provide an ID argument.
>>> Adding an ID corrected the issue in my code - all was good in the world.
>>> I thought I would add some code to the AbstractGateway class - and >>> specifically check that the missingMethodArguments was defined. >>> but couldn't work what I should be returning. >>> I checked the sessionWrapper that it seemed to be using for everything >>> else - to see if there was some sort of "throwError" method - but couldn't >>> find one.
>>> So I thought I would shoot off a message and see if it was a worthwhile >>> suggestion (creating a custom error message function AND using the new >>> function if something happens internally with the AbstractGateway). >>> And if it was - is there a specific place that makes the most sense to >>> implement such a method?
>>> Lastly, >>> While checking through the AbstractGateway I also noted on line 161 is >>> the following line; >>> return getSessionWrapper().new(local.class);;
>>> I assume the extra semi-colon is redundant?
>>> Gavin.
>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "ColdSpring-Users" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ. >>> To post to this group, send email to coldspring-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> coldspring-users+unsubscribe@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/coldspring-users?hl=en.
> I'll redo it - with some greater test coverage and repost when I have it
> corrected.
> On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:
>> Hi Mark,
>> Here is a diff that will provide a specific error message for a missing
>> ID argument.
>> Of course - feel free to butcher it as required to suit you style /
>> design standard.
>> On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:
>>> Better error handling is always good :)
>>> Have a look at the base exception.Exception object for how Coldspring
>>> manages exceptions.
>>> Mark
>>> On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:
>>>> Hi there everyone,
>>>> I just came across an error when using the
>>>> orm.hibernate.AbstractGateway class.
>>>> Element ID is undefined in LOCAL. The error occurred in *
>>>> C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line 151
>>>> *
>>>> *Called from* C:/DataPoint/com/**coldspring/orm/hibernate/**AbstractGateway.cfc:
>>>> line 80
>>>> *Called from* <generated>: line 1
>>>> *Called from* C:/inetpub/wwwroot/**projectDir/trunk/com/**
>>>> projectDir/AbstractService.**cfc: line 53
>>>> *Called from* C:/inetpub/wwwroot/**projectDir/trunk/index.cfm: line 47
>>>> *Called from* C:/inetpub/wwwroot/**projectDir/trunk/Application.**cfc:
>>>> line 266
>>>> There's nothing soecfically difficult to work out here - I used a
>>>> getXXX() method and didn't provide an ID argument.
>>>> Adding an ID corrected the issue in my code - all was good in the world.
>>>> I thought I would add some code to the AbstractGateway class - and
>>>> specifically check that the missingMethodArguments was defined.
>>>> but couldn't work what I should be returning.
>>>> I checked the sessionWrapper that it seemed to be using for everything
>>>> else - to see if there was some sort of "throwError" method - but couldn't
>>>> find one.
>>>> So I thought I would shoot off a message and see if it was a worthwhile
>>>> suggestion (creating a custom error message function AND using the new
>>>> function if something happens internally with the AbstractGateway).
>>>> And if it was - is there a specific place that makes the most sense to
>>>> implement such a method?
>>>> Lastly,
>>>> While checking through the AbstractGateway I also noted on line 161 is
>>>> the following line;
>>>> return getSessionWrapper().new(local.**class);;
>>>> I assume the extra semi-colon is redundant?
>>>> Gavin.
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "ColdSpring-Users" group.
>>>> To view this discussion on the web visit https://groups.google.com/d/** >>>> msg/coldspring-users/-/**9qgZZnDPQ0AJ<https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ>
>>>> .
>>>> To post to this group, send email to coldspring-users@googlegroups.**
>>>> com <coldspring-users@googlegroups.com>.
>>>> To unsubscribe from this group, send email to
>>>> coldspring-users+unsubscribe@**googlegroups.com<coldspring-users%2Bunsubscr ibe@googlegroups.com>
>>>> .
>>>> For more options, visit this group at http://groups.google.com/** >>>> group/coldspring-users?hl=en<http://groups.google.com/group/coldspring-users?hl=en>
>>>> .
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.
On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com> wrote:
> No worries.
> Was also going to note that you haven't used the Exception mechanisms
> provided by ColdSpring.
> Mark
> On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>wrote:
>> Hi Mark,
>> Ignore my patch, please.
>> It is faulty.
>> I'll redo it - with some greater test coverage and repost when I have it
>> corrected.
>> On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:
>>> Hi Mark,
>>> Here is a diff that will provide a specific error message for a missing
>>> ID argument.
>>> Of course - feel free to butcher it as required to suit you style /
>>> design standard.
>>> On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:
>>>> Better error handling is always good :)
>>>> Have a look at the base exception.Exception object for how Coldspring
>>>> manages exceptions.
>>>> Mark
>>>> On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:
>>>>> Hi there everyone,
>>>>> I just came across an error when using the
>>>>> orm.hibernate.AbstractGateway class.
>>>>> Element ID is undefined in LOCAL. The error occurred in *
>>>>> C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line
>>>>> 151*
>>>>> *Called from* C:/DataPoint/com/**coldspring/orm/hibernate/**AbstractGateway.cfc:
>>>>> line 80
>>>>> *Called from* <generated>: line 1
>>>>> *Called from* C:/inetpub/wwwroot/**projectDir/trunk/com/**
>>>>> projectDir/AbstractService.**cfc: line 53
>>>>> *Called from* C:/inetpub/wwwroot/**projectDir/trunk/index.cfm: line 47
>>>>> *Called from* C:/inetpub/wwwroot/**projectDir/trunk/Application.**cfc:
>>>>> line 266
>>>>> There's nothing soecfically difficult to work out here - I used a
>>>>> getXXX() method and didn't provide an ID argument.
>>>>> Adding an ID corrected the issue in my code - all was good in the
>>>>> world.
>>>>> I thought I would add some code to the AbstractGateway class - and
>>>>> specifically check that the missingMethodArguments was defined.
>>>>> but couldn't work what I should be returning.
>>>>> I checked the sessionWrapper that it seemed to be using for everything
>>>>> else - to see if there was some sort of "throwError" method - but couldn't
>>>>> find one.
>>>>> So I thought I would shoot off a message and see if it was a
>>>>> worthwhile suggestion (creating a custom error message function AND using
>>>>> the new function if something happens internally with the AbstractGateway).
>>>>> And if it was - is there a specific place that makes the most sense to
>>>>> implement such a method?
>>>>> Lastly,
>>>>> While checking through the AbstractGateway I also noted on line 161 is
>>>>> the following line;
>>>>> return getSessionWrapper().new(local.**class);;
>>>>> I assume the extra semi-colon is redundant?
>>>>> Gavin.
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "ColdSpring-Users" group.
>>>>> To view this discussion on the web visit https://groups.google.com/d/* >>>>> *msg/coldspring-users/-/**9qgZZnDPQ0AJ<https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ>
>>>>> .
>>>>> To post to this group, send email to coldspring-users@googlegroups.**
>>>>> com <coldspring-users@googlegroups.com>.
>>>>> To unsubscribe from this group, send email to
>>>>> coldspring-users+unsubscribe@**googlegroups.com<coldspring-users%2Bunsubscr ibe@googlegroups.com>
>>>>> .
>>>>> For more options, visit this group at http://groups.google.com/** >>>>> group/coldspring-users?hl=en<http://groups.google.com/group/coldspring-users?hl=en>
>>>>> .
>> To post to this group, send email to coldspring-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> coldspring-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/coldspring-users?hl=en.
From: coldspring-users@googlegroups.com
[mailto:coldspring-users@googlegroups.com] On Behalf Of Mark Mandel
Sent: Thursday, 21 June 2012 11:36
To: coldspring-users@googlegroups.com
Subject: Re: [coldspring-users] AbstractGateway
As an aside - curious why you didn't just fork CS in GitHub and send a pull
request? Would have thought that would have been easier than a patch?
Mark
On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com> wrote:
No worries.
Was also going to note that you haven't used the Exception mechanisms
provided by ColdSpring.
Mark
On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
wrote:
Hi Mark,
Ignore my patch, please.
It is faulty.
I'll redo it - with some greater test coverage and repost when I have it
corrected.
On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:
Hi Mark,
Here is a diff that will provide a specific error message for a missing ID
argument.
Of course - feel free to butcher it as required to suit you style / design
standard.
On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:
Better error handling is always good :)
Have a look at the base exception.Exception object for how Coldspring
manages exceptions.
Mark
On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>
wrote:
Hi there everyone,
I just came across an error when using the orm.hibernate.AbstractGateway
class.
Element ID is undefined in LOCAL.
The error occurred in
C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line 151
Called from C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
line 80
Called from <generated>: line 1
Called from
C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc: line
53
Called from C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47
Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 266
There's nothing soecfically difficult to work out here - I used a getXXX()
method and didn't provide an ID argument.
Adding an ID corrected the issue in my code - all was good in the world.
I thought I would add some code to the AbstractGateway class - and
specifically check that the missingMethodArguments was defined.
but couldn't work what I should be returning.
I checked the sessionWrapper that it seemed to be using for everything else
- to see if there was some sort of "throwError" method - but couldn't find
one.
So I thought I would shoot off a message and see if it was a worthwhile
suggestion (creating a custom error message function AND using the new
function if something happens internally with the AbstractGateway).
And if it was - is there a specific place that makes the most sense to
implement such a method?
Lastly,
While checking through the AbstractGateway I also noted on line 161 is the
following line;
return getSessionWrapper().new(local.class);;
I assume the extra semi-colon is redundant?
Gavin.
-- You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
-- You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
Just an aside: at this point all developers really should get familiar with
the bare minimum of using Git. Even if it's not your preference, it is
extremely widely used now. And one of the reasons that it's great is that
this exact situation (contributing to an open source project) is handled so
elegantly.
Brian
On Wed, Jun 20, 2012 at 10:08 PM, Gavin Baumanis <beauecli...@gmail.com>wrote:
> As an aside - curious why you didn't just fork CS in GitHub and send a
> pull request? Would have thought that would have been easier than a patch?
> ****
> ** **
> Mark****
> On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com>
> wrote:****
> No worries.****
> ** **
> Was also going to note that you haven't used the Exception mechanisms
> provided by ColdSpring.****
> ** **
> Mark****
> ** **
> On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
> wrote:****
> Hi Mark,****
> ** **
> Ignore my patch, please.****
> It is faulty.****
> ** **
> I'll redo it - with some greater test coverage and repost when I have it
> corrected.****
> ** **
> On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:****
> Hi Mark,****
> Here is a diff that will provide a specific error message for a missing ID
> argument.****
> Of course - feel free to butcher it as required to suit you style / design
> standard.****
> There's nothing soecfically difficult to work out here - I used a getXXX()
> method and didn't provide an ID argument.****
> ** **
> Adding an ID corrected the issue in my code - all was good in the world.**
> **
> ** **
> I thought I would add some code to the AbstractGateway class - and
> specifically check that the missingMethodArguments was defined.****
> but couldn't work what I should be returning.****
> I checked the sessionWrapper that it seemed to be using for everything
> else - to see if there was some sort of "throwError" method - but couldn't
> find one.****
> ** **
> So I thought I would shoot off a message and see if it was a worthwhile
> suggestion (creating a custom error message function AND using the new
> function if something happens internally with the AbstractGateway).****
> And if it was - is there a specific place that makes the most sense to
> implement such a method?****
> ** **
> Lastly,****
> While checking through the AbstractGateway I also noted on line 161 is the
> following line;****
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.
But since I am the patch manager for Subversion - I was being facetious
about Git.
From: coldspring-users@googlegroups.com
[mailto:coldspring-users@googlegroups.com] On Behalf Of Brian Kotek
Sent: Thursday, 21 June 2012 13:14
To: coldspring-users@googlegroups.com
Subject: Re: [coldspring-users] AbstractGateway
Just an aside: at this point all developers really should get familiar with
the bare minimum of using Git. Even if it's not your preference, it is
extremely widely used now. And one of the reasons that it's great is that
this exact situation (contributing to an open source project) is handled so
elegantly.
Brian
On Wed, Jun 20, 2012 at 10:08 PM, Gavin Baumanis <beauecli...@gmail.com>
wrote:
I don't know how to use GIT.
Never have - possibly never will.
SVN all the way!
From: coldspring-users@googlegroups.com
[mailto:coldspring-users@googlegroups.com] On Behalf Of Mark Mandel
Sent: Thursday, 21 June 2012 11:36
To: coldspring-users@googlegroups.com
Subject: Re: [coldspring-users] AbstractGateway
As an aside - curious why you didn't just fork CS in GitHub and send a pull
request? Would have thought that would have been easier than a patch?
Mark
On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com> wrote:
No worries.
Was also going to note that you haven't used the Exception mechanisms
provided by ColdSpring.
Mark
On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
wrote:
Hi Mark,
Ignore my patch, please.
It is faulty.
I'll redo it - with some greater test coverage and repost when I have it
corrected.
On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:
Hi Mark,
Here is a diff that will provide a specific error message for a missing ID
argument.
Of course - feel free to butcher it as required to suit you style / design
standard.
On Friday, May 18, 2012 12:32:19 AM UTC+10, Mark Mandel wrote:
Better error handling is always good :)
Have a look at the base exception.Exception object for how Coldspring
manages exceptions.
Mark
On Sat, May 12, 2012 at 9:54 PM, Gavin Baumanis <beauecli...@gmail.com>
wrote:
Hi there everyone,
I just came across an error when using the orm.hibernate.AbstractGateway
class.
Element ID is undefined in LOCAL.
The error occurred in
C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc: line 151
Called from C:/DataPoint/com/coldspring/orm/hibernate/AbstractGateway.cfc:
line 80
Called from <generated>: line 1
Called from
C:/inetpub/wwwroot/projectDir/trunk/com/projectDir/AbstractService.cfc: line
53
Called from C:/inetpub/wwwroot/projectDir/trunk/index.cfm: line 47
Called from C:/inetpub/wwwroot/projectDir/trunk/Application.cfc: line 266
There's nothing soecfically difficult to work out here - I used a getXXX()
method and didn't provide an ID argument.
Adding an ID corrected the issue in my code - all was good in the world.
I thought I would add some code to the AbstractGateway class - and
specifically check that the missingMethodArguments was defined.
but couldn't work what I should be returning.
I checked the sessionWrapper that it seemed to be using for everything else
- to see if there was some sort of "throwError" method - but couldn't find
one.
So I thought I would shoot off a message and see if it was a worthwhile
suggestion (creating a custom error message function AND using the new
function if something happens internally with the AbstractGateway).
And if it was - is there a specific place that makes the most sense to
implement such a method?
Lastly,
While checking through the AbstractGateway I also noted on line 161 is the
following line;
return getSessionWrapper().new(local.class);;
I assume the extra semi-colon is redundant?
Gavin.
-- You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
-- You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
-- You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com
<mailto:coldspring-users%2Bunsubscribe@googlegroups.com> .
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
-- You received this message because you are subscribed to the Google Groups
"ColdSpring-Users" group.
To post to this group, send email to coldspring-users@googlegroups.com.
To unsubscribe from this group, send email to
coldspring-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/coldspring-users?hl=en.
> Just an aside: at this point all developers really should get familiar
> with the bare minimum of using Git. Even if it's not your preference, it is
> extremely widely used now. And one of the reasons that it's great is that
> this exact situation (contributing to an open source project) is handled so
> elegantly.****
> ** **
> Brian****
> ** **
> ** **
> On Wed, Jun 20, 2012 at 10:08 PM, Gavin Baumanis <beauecli...@gmail.com>
> wrote:****
> As an aside - curious why you didn't just fork CS in GitHub and send a
> pull request? Would have thought that would have been easier than a patch?
> ****
> ****
> Mark****
> On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com>
> wrote:****
> No worries.****
> ****
> Was also going to note that you haven't used the Exception mechanisms
> provided by ColdSpring.****
> ****
> Mark****
> ****
> On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
> wrote:****
> Hi Mark,****
> ****
> Ignore my patch, please.****
> It is faulty.****
> ****
> I'll redo it - with some greater test coverage and repost when I have it
> corrected.****
> ****
> On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:****
> Hi Mark,****
> Here is a diff that will provide a specific error message for a missing ID
> argument.****
> Of course - feel free to butcher it as required to suit you style / design
> standard.****
> There's nothing soecfically difficult to work out here - I used a getXXX()
> method and didn't provide an ID argument.****
> ****
> Adding an ID corrected the issue in my code - all was good in the world.**
> **
> ****
> I thought I would add some code to the AbstractGateway class - and
> specifically check that the missingMethodArguments was defined.****
> but couldn't work what I should be returning.****
> I checked the sessionWrapper that it seemed to be using for everything
> else - to see if there was some sort of "throwError" method - but couldn't
> find one.****
> ****
> So I thought I would shoot off a message and see if it was a worthwhile
> suggestion (creating a custom error message function AND using the new
> function if something happens internally with the AbstractGateway).****
> And if it was - is there a specific place that makes the most sense to
> implement such a method?****
> ****
> Lastly,****
> While checking through the AbstractGateway I also noted on line 161 is the
> following line;****
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> ** **
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/coldspring-users?hl=en.****
> --
> You received this message because you are subscribed to the Google Groups
> "ColdSpring-Users" group.
> To post to this group, send email to coldspring-users@googlegroups.com.
> To unsubscribe from this group, send email to
> coldspring-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
>> Just an aside: at this point all developers really should get familiar
>> with the bare minimum of using Git. Even if it's not your preference, it is
>> extremely widely used now. And one of the reasons that it's great is that
>> this exact situation (contributing to an open source project) is handled so
>> elegantly.****
>> ** **
>> Brian****
>> ** **
>> ** **
>> On Wed, Jun 20, 2012 at 10:08 PM, Gavin Baumanis <beauecli...@gmail.com>
>> wrote:****
>> As an aside - curious why you didn't just fork CS in GitHub and send a
>> pull request? Would have thought that would have been easier than a patch?
>> ****
>> ****
>> Mark****
>> On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com>
>> wrote:****
>> No worries.****
>> ****
>> Was also going to note that you haven't used the Exception mechanisms
>> provided by ColdSpring.****
>> ****
>> Mark****
>> ****
>> On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
>> wrote:****
>> Hi Mark,****
>> ****
>> Ignore my patch, please.****
>> It is faulty.****
>> ****
>> I'll redo it - with some greater test coverage and repost when I have it
>> corrected.****
>> ****
>> On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:****
>> Hi Mark,****
>> Here is a diff that will provide a specific error message for a missing
>> ID argument.****
>> Of course - feel free to butcher it as required to suit you style /
>> design standard.****
>> There's nothing soecfically difficult to work out here - I used a
>> getXXX() method and didn't provide an ID argument.****
>> ****
>> Adding an ID corrected the issue in my code - all was good in the world.*
>> ***
>> ****
>> I thought I would add some code to the AbstractGateway class - and
>> specifically check that the missingMethodArguments was defined.****
>> but couldn't work what I should be returning.****
>> I checked the sessionWrapper that it seemed to be using for everything
>> else - to see if there was some sort of "throwError" method - but couldn't
>> find one.****
>> ****
>> So I thought I would shoot off a message and see if it was a worthwhile
>> suggestion (creating a custom error message function AND using the new
>> function if something happens internally with the AbstractGateway).****
>> And if it was - is there a specific place that makes the most sense to
>> implement such a method?****
>> ****
>> Lastly,****
>> While checking through the AbstractGateway I also noted on line 161 is
>> the following line;****
>> I assume the extra semi-colon is redundant?****
>> ****
>> ****
>> Gavin.****
>> ****
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ColdSpring-Users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/coldspring-users/-/9qgZZnDPQ0AJ.
>> To post to this group, send email to coldspring-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> coldspring-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/coldspring-users?hl=en.****
>> To post to this group, send email to coldspring-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> coldspring-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/coldspring-users?hl=en.****
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ColdSpring-Users" group.
>> To post to this group, send email to coldspring-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> coldspring-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/coldspring-users?hl=en.****
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ColdSpring-Users" group.
>> To post to this group, send email to coldspring-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> coldspring-users+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/coldspring-users?hl=en.****
>> ** **
>> --
>> You received this message because you are subscribed to the Google Groups
>> "ColdSpring-Users" group.
>> To post to this group, send email to coldspring-users@googlegroups.com.
>> To unsubscribe from this group, send
It is quite possible to use Git without "buying into it". There's a big gap
between knowing enough Git to create and submit patches without driving
yourself or the project owner insane, and inhaling the GitHub kool-aid.
With only a little Git knowledge you can create and submit patches that
Mark can merge into his GitHub repository, without having to follow
workflows such as "git-flow" or "GitHub pull requests" that Git fanbois
keep rabbiting on about. I've thrown together a few commands to show you
how to do this, which I am calling
*** A GIT HATER'S CRASH COURSE FOR FIXING BUGS IN COLDSPRING ***
Pros:
- No need to have an account on GitHub or any other Git hosting service
- It doesn't involve requesting anyone to "pull" you ;)
- You still show up as the author of the bugfixes in the repository's
history
Cons:
- Still need to install git locally and use a few git commands (tho I've
tried to keep it to the bare essentials)
- Doesn't handle conflicts between your bugfixes and newer changes in
upstream (but hey, at least you tried!)
# Time to start fixing some bugs!
cd coldspring
# Switch to the develop branch (where the all the new ColdSpring hotness
lives)
git checkout develop
# Create a bugfix branch and switch immediately to it
git checkout -b fix_foobaz
# Edit some files
edit file1
edit file2
# Ask git on the status of the working tree
git status
# Schedule the changes made to the edited files for the next commit
git add file1 file2
# Commit the changes locally
git commit -m 'Foo did not baa correctly'
# We don't really need the docs, do we?
rm -rf docs
git status
# Oops; we screwed up the working tree! Undo _ALL_ uncommitted changes
(scheduled or not) with a hard reset
# USE THIS COMMAND WITH CAUTION! THE EFFECTS CANNOT BE UNDONE!
# Note that a hard reset does not recover files that were not being tracked
by Git
git reset --hard
# Edit another file
edit file3
git add file3
git status
# Oops; we needed to edit that file, but we don't want the change in the
next commit. Unschedule the change with a reset
git reset HEAD -- file3
# Edit one more file
edit file4
git add file4
# Continue editing the same file
edit file4
git status
# We must add the file again if we want the second set of changes to be
committed
git add file4
git status
# Everything looks good now; commit!
git commit -m 'Baz now works with foo'
# Create a special git multi-patch file of all the commits we made in our
bugfix branch
git format-patch --stdout develop > fix_foobaz.am.txt
# Email fix_foobaz.am.txt to upstream
# Upstream accepted the patches, yay! Switch back to develop, pull the new
history, and start all over again...
git checkout develop
git pull origin develop
>>> Just an aside: at this point all developers really should get familiar
>>> with the bare minimum of using Git. Even if it's not your preference, it is
>>> extremely widely used now. And one of the reasons that it's great is that
>>> this exact situation (contributing to an open source project) is handled so
>>> elegantly.****
>>> ** **
>>> Brian****
>>> ** **
>>> ** **
>>> On Wed, Jun 20, 2012 at 10:08 PM, Gavin Baumanis <beauecli...@gmail.com>
>>> wrote:****
>>> As an aside - curious why you didn't just fork CS in GitHub and send a
>>> pull request? Would have thought that would have been easier than a patch?
>>> ****
>>> ****
>>> Mark****
>>> On Thu, Jun 21, 2012 at 11:32 AM, Mark Mandel <mark.man...@gmail.com>
>>> wrote:****
>>> No worries.****
>>> ****
>>> Was also going to note that you haven't used the Exception mechanisms
>>> provided by ColdSpring.****
>>> ****
>>> Mark****
>>> ****
>>> On Thu, Jun 21, 2012 at 11:27 AM, Gavin Baumanis <beauecli...@gmail.com>
>>> wrote:****
>>> Hi Mark,****
>>> ****
>>> Ignore my patch, please.****
>>> It is faulty.****
>>> ****
>>> I'll redo it - with some greater test coverage and repost when I have it
>>> corrected.****
>>> ****
>>> On Wednesday, June 20, 2012 10:54:27 PM UTC+10, Gavin Baumanis wrote:***
>>> *
>>> Hi Mark,****
>>> Here is a diff that will provide a specific error message for a missing
>>> ID argument.****
>>> Of course - feel free to butcher it as required to suit you style /
>>> design standard.****