Jump to content

Recommended Posts

Posted

bhayya eppudu nenu okka document generate chesthunanu using one of the API, so adhi fail ayithey use other code to generate document

  

 

okka table lo okka flage chesa initial value is true with api generation ani , then created a variable assigned the value from db resultset..

 

apidoc = resultset value(true)

if(apidoc){

 

API code 

but if unable to generate or exception catch chesthey then how i can change that variable "apidoc" value to false and go with other non api code

}

 

 question is how i can set variable value in catch block

Posted

if my understaning is correct, you can wrap your code into try {} catch{}

 

snippet: 

 

boolean apidoc = false;

try{

        apidoc=resultset value(true)

        if(apidoc){

   }catch{

apidoc =false;

/*Now call your another api code*/

}

Posted

Catch block e.pruntStackTrace ki mundu false ki set chey variable ni

Posted

Bhayya eppudu a variable set chesamu then exception catch chesaka it will not exceute other programe right

Catch block e.pruntStackTrace ki mundu false ki set chey variable ni

 

Posted

apidoc= false set ayyina taruvatha will exceute remaining code aa?

if my understaning is correct, you can wrap your code into try {} catch{}

 

snippet: 

 

boolean apidoc = false;

try{

        apidoc=resultset value(true)

        if(apidoc){

   }catch{

apidoc =false;

/*Now call your another api code*/

}

 

Posted

apidoc= false set ayyina taruvatha will exceute remaining code aa?

 

Yes it will execute the remaining code..  In stead of writing the whole code in catch block.. wrap that else code in a method and call that method in catch block.

×
×
  • Create New...