A18th century German philosopher Immanuel Kant (1724-1804) presents a view on moral obligation, which he calls the categorical imperative. Kant's philosophy later called Kantian philosophy outlines the Universal Law Formation of the Categorical Imperative as a method for determining morality of actions. Kant's formula consists of a two part test. First, one creates a maxim and considers whether the maxim could be a universal law for all rational beings and the second one determines whether rational beings would will it to be a universal law.
The initial stage of the Universal Law Formation of the Categorical Imperative requires that a maxim be universally applicable to all rational beings. The second requirement is that a rational being would will this maxim to become a universal law. In testing this part, you must decide whether in every case, a rational being would believe that the morally correct action is to tell the truth. Once it is clear that the maxim passes both tests, there are no exceptions. As a emergency medical technician is faced with a with a distraught widow who asks whether her husband suffered in his death, you must decide which maxim to create and perform. The maxim when answering the woman's question , always telling the truth regarding the nature of her late husband's death. The initial stage of the Universal Law Formation of the Categorical Imperative requires that a maxim be universally applicable to all rational beings. Therefore, this maxim is logical and everyone can put up with it. In testing the 2nd part, you must decide whether in every case, a rational being would believe that the morally correct action is to tell the truth. But if you decided to lie, what purpose would that serve besides trying to spare one's feelings? Regardless the expected action is to tell the truth. Now for example let's say the truth brings about the woman committing suicide, but Kant says that no rational being would will the maxim to become a universal law.