error handling on constant declaration