A St. Catharines man who snorted cocaine in front of a probation officer after becoming frustrated because he wasn't allowed to use a washroom has been sentenced to 45 days in jail.

In Ontario Court of Justice in St. Catharines Tuesday, Judge Donald Wolfe called Patrick Egal's method of expressing his displeasure as "very brazen and provocative."

On Dec. 16, 2018, court heard, Egal attended at a probation office in downtown St. Catharines. The 31-year-old was on probation at the time, but did not have a scheduled appointment that day.

When officials told him he could not use the facilities, Egal emptied a bag of cocaine onto a table in the office and snorted the powder from the table top.

He was arrested and taken to a police station where a search uncovered he was also carrying a small bag of crystal methamphetamine.

He pleaded guilty Tuesday to a charge of possession of crystal meth and two counts of breaching a probation order.

Defence counsel Mark Evans said his client is highly intelligent, yet struggles with a number of issues including substance abuse and homelessness.

"It is brazen, but the brazenness is tempered by issues lurking in the background," he told the judge.