Try Catch

From SwiftAPI

Jump to: navigation, search

Contents

C++

try {
 
} 
catch (type e) {
 
}

C#

try {
 
} 
catch (Exception e) {
 
}

Java

try {
 
} 
catch (Exception e) {
 
}

JavaScript

try {
 
}
catch(e) {
 
}

Perl

eval {
 
};
if ($@) {
 
}

PHP

try {
 
}
catch(Exception $e) {
 
}

Python

try:
    pass
except Exception as e:
    pass

Ruby

begin
 
rescue Exception => e
 
end
Personal tools