how can i call a throwable method inside a runnable, for creating a new thread.
while trying to create a progressbar in android i came across this problem.
i am following this example : http://developer.android.com/reference/android/widget/ProgressBar.html

my problem is that one of my methods i want to call has to be inside a try and catch
how do i do that inside of a runnable?

    Runnable SendThread = new Runnable() 
	{
		try 
		{
			GetAndConvertImagesToPdf();
			mProgStatus = 30;
			mProgress.setProgress(mProgStatus);
			title.setText(R.string.sendingTitle);
			
		} 
		catch (DocumentException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		catch (IOException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    };


i get this error: 

"Syntax error on token try, delete this token"

how can i resolve this?

thank you
how can i call a throwable method inside a runnable, for creating a new thread.
===

while trying to create a progressbar in android i came across this problem.
i am following this example : http://developer.android.com/reference/android/widget/ProgressBar.html

my problem is that one of my methods i want to call has to be inside a try and catch
how do i do that inside of a runnable?

    Runnable SendThread = new Runnable() 
	{
		try 
		{
			GetAndConvertImagesToPdf();
			mProgStatus = 30;
			mProgress.setProgress(mProgStatus);
			title.setText(R.string.sendingTitle);
			
		} 
		catch (DocumentException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		catch (IOException e) 
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    };


i get this error: 

"Syntax error on token try, delete this token"

how can i resolve this?

thank you