Dogs don't secrete hot, salty tears when they're sad, nor do they wail or sob like people.
When we're talking about a whimper or whine, the canine "cry" can mean one of a million things.
As with barking, Dogs who whimper or whine are trying to communicate.