try
{
//Try doing something
}
catch(//Error name) //If an error occurs
{
//Handle the error
}
This is called error handling. What is done is, something is executed in the try statement that MIGHT cause some error under some circumstances. If there are no errors then the program continues as is. If there are errors then the catch statement is executed and maybe error messages are shown to the user or something alternative is done instead of crashing the program.
So in the code you gave, the try statement tries to allocate some memory. If it fails the catch statement executes depending on which error occurred. This is given by name in the catch statement parameter.