{"record":{"id":"4c579d8def0a111b","repo":"padrino/padrino-framework","slug":"you-cannot-use-except-with-other-options-specifie","errorCode":null,"errorMessage":"You cannot use :except with other options specified","messagePattern":"You cannot use :except with other options specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"padrino-core/lib/padrino-core/application/routing.rb","lineNumber":222,"sourceCode":"      #   end\n      #\n      # @example if filters based on a symbol or regexp\n      #   before :index, /main/ do; ... end\n      #   # => match only path that are  +/+ or contains +main+\n      #\n      # @example filtering everything except an occurrence\n      #   before except: :index do; ...; end\n      #\n      # @example you can also filter using a request param\n      #   before agent: /IE/ do; ...; end\n      #   # => match +HTTP_USER_AGENT+ containing +IE+\n      #\n      # @see http://padrinorb.com/guides/controllers/route-filters/\n      #\n      def construct_filter(*args, &block)\n        options = args.last.is_a?(Hash) ? args.pop : {}\n        if (except = options.delete(:except))\n          raise 'You cannot use :except with other options specified' unless args.empty? && options.empty?\n          except = Array(except)\n          options = except.last.is_a?(Hash) ? except.pop : {}\n        end\n        Filter.new(!except, @_controller, options, Array(except || args), &block)\n      end\n\n      ##\n      # Provides many parents with shallowing.\n      #\n      # @param [Symbol] name\n      #   The parent name.\n      #\n      # @param [Hash] options\n      #   Additional options.\n      #\n      # @example\n      #   controllers :product do\n      #     parent :shop, optional: true, map: \"/my/stand\"","sourceCodeStart":204,"sourceCodeEnd":240,"githubUrl":"https://github.com/padrino/padrino-framework/blob/167044f3d56b2bce12f943eb826fdb0b0ea94375/padrino-core/lib/padrino-core/application/routing.rb#L204-L240","documentation":"Error \"You cannot use :except with other options specified\" thrown in padrino/padrino-framework.","triggerScenarios":"Thrown at padrino-core/lib/padrino-core/application/routing.rb:222 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"167044f3d56b2bce12f943eb826fdb0b0ea94375","analyzedAt":"2026-08-23T12:41:41.049Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}