Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Can’t say that now
@highlight
try {
echo inverse(5) . "\n";
echo inverse(0) . "\n";
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
} -
@highlight
try {
return publisher.Publish(event);
}
catch (Exception e) {
_logger.LogCritical("Fuck");
throw;
} -
msicc25yI do this way too often 😁:
try
{
WhateverMethod();
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
Well, at least while writing fresh code... -
@Plasticnova Haha! I meant in the new project I just hopped on. But thanks for making my day. :)
-
Parzi88335yin python a few things that search for items in other items throw exceptions if they're not there, which is dumb, but requires try/catch to not crash. (I've used this occasionally as it's all I can use sometimes.
-
try {
blahblahoof
}.catch(err) {
Console.log("Delete this shit --> " + err);
}
//Problem solved
Related Rants
Haven't found any catch block that has anything other than:
// TODO Handle Exception
rant
catch all
exception