cancel
Showing results for 
Search instead for 
Did you mean: 

Own Exceptions over interface

Former Member
0 Kudos

HI,

i want to use my own Exceptions over the interface of a DC. But when I use own Exceptions, the method is not in the interface in used Componenets when I use this DC in another DC.

When I remove my own exceptions, the method appears in the other DC.

How can I use my own exceptions over the interface?

Best regards,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

former_member185086
Active Contributor
0 Kudos

Hi

As WD is a custom framework, you can not modify its behaviour, folllow the given workaround to do so

1.Create a java class or interface.

2.Put it inside any package (src><folder name >-> class or interface).

3.Now create a public a part of this file and use it where you want .

4.Alternate is

public void TestMethod( )
  {
    //@@begin TestMethod()
	   Test fd= new Test();
		fd.test();
    //@@end
  }

  /  //@@begin others
	
	public class Test extends Exception
	{
		public void test()
		{
			
		}
	}
  //@@end

I hope you get the idea , but just wanted to inform you that you just customized the messages of that exception , and these thing are already there in WebDynpro environmment .

Example

File file= new File("C:\\MyFile.txt");
		FileInputStream fis= null;
		try
		{
			fis= new FileInputStream(file);
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
			wdComponentAPI.getMessageManager().reportException("Your messages ", false);
		}

Is there any special case , please share , it ll give us some idea.

Best Regards

Satish Kumar

Former Member
0 Kudos

HI,

thanks for your answer. I got the idea to solve my problem.

I will put my exceptions in a DC which all my other DC's of my application will use. So I can have my own exceptions.

Best regards,

Peter

Answers (0)