What happens if a country was engaging in war when a treaty was made

IF a country just made a treaty few years ago and one of the country from and attacked with out the other country knowing. Also what happens if a country just changed powers and the other country attacked that country.
Asked Apr 13, 2014

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.