Error / Exception Handling

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error / Exception Handling

Vedam B
Hi all,

By design OFBiz supports PRODUCT ID as Input instead of Auto-generated
sequence.

So, when user tried to create a PRODUCT with the same ID which is already
available, I want to send custom message instead of code details.

Request your help on this.

Regards
Vedam
Reply | Threaded
Open this post in threaded view
|

Re: Error / Exception Handling

BJ Freeman
there maybe other ways.
here are the ones that come to mind
1) change the controller  request map error response to a page with your
code.
<response name="error" type="view" value="error"/>

2) you can go deeper into the code and change the errmsgs so they show
on the normal error page.


Vedam B sent the following on 11/19/2007 12:07 PM:

> Hi all,
>
> By design OFBiz supports PRODUCT ID as Input instead of Auto-generated
> sequence.
>
> So, when user tried to create a PRODUCT with the same ID which is already
> available, I want to send custom message instead of code details.
>
> Request your help on this.
>
> Regards
> Vedam
>
Reply | Threaded
Open this post in threaded view
|

Re: Error / Exception Handling

Vedam B
Can I define some ERROR codes and configure that in controller to send
custom message based on the ERROR code?

Regards
Vedam

On Nov 20, 2007 1:52 AM, BJ Freeman <[hidden email]> wrote:

> there maybe other ways.
> here are the ones that come to mind
> 1) change the controller  request map error response to a page with your
> code.
> <response name="error" type="view" value="error"/>
>
> 2) you can go deeper into the code and change the errmsgs so they show
> on the normal error page.
>
>
> Vedam B sent the following on 11/19/2007 12:07 PM:
> > Hi all,
> >
> > By design OFBiz supports PRODUCT ID as Input instead of Auto-generated
> > sequence.
> >
> > So, when user tried to create a PRODUCT with the same ID which is
> already
> > available, I want to send custom message instead of code details.
> >
> > Request your help on this.
> >
> > Regards
> > Vedam
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Error / Exception Handling

BJ Freeman
You have to do that in the code for productID creation the controller is
simply and director.

BTW if you create a product it will auto generate and ID.
not sure how you doing this.
but I use the service to create a product.
if you got to the product page
https://localhost:8443/catalog/control/EditProduct
and fill in everything but the productID it will create one for you when
 you click on create product.


Vedam B sent the following on 11/19/2007 12:25 PM:

> Can I define some ERROR codes and configure that in controller to send
> custom message based on the ERROR code?
>
> Regards
> Vedam
>
> On Nov 20, 2007 1:52 AM, BJ Freeman <[hidden email]> wrote:
>
>> there maybe other ways.
>> here are the ones that come to mind
>> 1) change the controller  request map error response to a page with your
>> code.
>> <response name="error" type="view" value="error"/>
>>
>> 2) you can go deeper into the code and change the errmsgs so they show
>> on the normal error page.
>>
>>
>> Vedam B sent the following on 11/19/2007 12:07 PM:
>>> Hi all,
>>>
>>> By design OFBiz supports PRODUCT ID as Input instead of Auto-generated
>>> sequence.
>>>
>>> So, when user tried to create a PRODUCT with the same ID which is
>> already
>>> available, I want to send custom message instead of code details.
>>>
>>> Request your help on this.
>>>
>>> Regards
>>> Vedam
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Error / Exception Handling

Vedam B
Thanks for your help.

Regards
Vedam

On Nov 20, 2007 2:04 AM, BJ Freeman <[hidden email]> wrote:

> You have to do that in the code for productID creation the controller is
> simply and director.
>
> BTW if you create a product it will auto generate and ID.
> not sure how you doing this.
> but I use the service to create a product.
> if you got to the product page
> https://localhost:8443/catalog/control/EditProduct
> and fill in everything but the productID it will create one for you when
>  you click on create product.
>
>
> Vedam B sent the following on 11/19/2007 12:25 PM:
> > Can I define some ERROR codes and configure that in controller to send
> > custom message based on the ERROR code?
> >
> > Regards
> > Vedam
> >
> > On Nov 20, 2007 1:52 AM, BJ Freeman <[hidden email]> wrote:
> >
> >> there maybe other ways.
> >> here are the ones that come to mind
> >> 1) change the controller  request map error response to a page with
> your
> >> code.
> >> <response name="error" type="view" value="error"/>
> >>
> >> 2) you can go deeper into the code and change the errmsgs so they show
> >> on the normal error page.
> >>
> >>
> >> Vedam B sent the following on 11/19/2007 12:07 PM:
> >>> Hi all,
> >>>
> >>> By design OFBiz supports PRODUCT ID as Input instead of Auto-generated
> >>> sequence.
> >>>
> >>> So, when user tried to create a PRODUCT with the same ID which is
> >> already
> >>> available, I want to send custom message instead of code details.
> >>>
> >>> Request your help on this.
> >>>
> >>> Regards
> >>> Vedam
> >>>
> >
>