Detect exception type

An example showing how to detect exception type using Tizen 2.3.
1
2
3
4
5
6
7
8
9
10
11
try {
  throw new CustomException();
} catch (e) {
  if (e instanceof CustomException) {
    
  } else if (e instanceof AnotherException) {
    
  } else {
    
  }
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX