Is the law is wrong? Maybe, in fact I might agree with the right to vote secession, but (IMHO) this needs to be done with great care, if not, any region of any state can call a vote for independence each time they disagree with the neighbors. In fact this kind of "blackmail" has been used consistently in Catalonia for years: "If you don't vote this bill, we will secede from Spain".
So, I don't think that the law that prohibit referendums for secession is completely nonsense. Exceptions of course can be made, but, is the case of Catalonia an exception? Before answer that, please, think if you have all the data to make that statement.