1

I am working through an AWS tutorial and came across Java syntax that I don't quite understand.

protected AmazonSimpleWorkflow service = AmazonSimpleWorkflowClientBuilder.defaultClient();
{
    try {
        AmazonSimpleWorkflowClientBuilder.defaultClient().registerDomain(new RegisterDomainRequest().withName(domain).withDescription("desc").withWorkflowExecutionRetentionPeriodInDays("7"));
    } catch (DomainAlreadyExistsException e) {
    }
}

I thought that try / catch blocks needed to be inside of a function, but this example is using it directly after an assignment. What exactly is the operation going on here and what is the name of it?

scenthound
  • 11
  • 1

0 Answers0