Exact Solution of Non-Hermitian Systems with Generalized Boundary Conditions: Size-Dependent Boundary Effect and Fragility of the Skin Effect.