Leonardo Dicaprio may be considered one of the best actors of his generation, and he chooses his roles carefully. One of his roles put him in a very dangerous situation though.

Leo DiCaprioLeo DiCaprio at the premiere of 'The Wolf of Wall Street'

The actor told Ellen DeGeneres that while shooting the film Blood Diamond, he became trapped in a shark tank — with a shark!

"They actually said (that) in 30 years, this has never happened," DiCaprio said, according to Today. "But the tuna kind of got stuck on the top of the cage, and the great white kind of leapt out and tried to bite it, and it went into the cage with me and half its body was in and out, and I flattened down at the bottom and it chomped a few times."

DiCaprio's foundation works to protect many animals and their habitats, including threatened sharks. But even so, DiCaprio didn't want to become dinner for the shark, telling DeGeneres "it was absolutely terrifying."

Leo DiCaprioLeonardo DiCaprio posing with director Martin Scorcese

Speaking of food, the actor shared a secret about his new film the Wolf of Wall Street. In one scene, Jonah Hill chokes on a piece of ham, which then gets stuck on DiCaprio's character's face. The actor said it didn't work out the way everyone thought it had hoped.

"We had to do 70 takes because they couldn't get this ham to stick on my face," DiCaprio said. "And they had to (use) K-Y Jelly, and there was literally a guy there with this plastic spoon just flicking ham on my face all day long."

The Wolf of Wall Street is in theaters now.